Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

public class Base {
public void myMethod(int a,intb) {}
}

// Uses myMethod and then hides it.
public class DerivedOne extends Base {

private void myMethod(int a,int b);
}

will this compile or not .yes or no. why

Answer Posted / narayana

This will not compile because in the base class myMethod()
function is not having the body ,only abstract methods
should not have the body remaining all methods should have
the body

Is This Answer Correct ?    6 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is visibility mode?

948


Is integer immutable in java?

966


Can you use abstract and final both with a method?

1049


How to change value in arraylist java?

1151


What is hash code collision?

1036


What is the public method modifier?

995


When a byte datatype is used?

2149


What are the four corner stones of oop?

1010


Write code to implement bubble sort in java?

976


These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }

1071


What does it mean that a class or member is final?

982


what is session in java?

1231


Why does java have two ways to create child threads? Which way is better?

1027


What do you understand by the term string pool?

990


What is tostring () method?

998