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 are pass by reference and pass by value?

1040


What is substring in java?

1303


What is the difference between the size and capacity of a vector?

1102


What is final class?

1065


What is predicate in java?

1103


What is a parent class in java?

1066


Which is the best sorting technique in java?

1036


What does  mean in regex?

1110


Are primitives objects?

1113


Why synchronization is important?

1076


Which is easier .net or java?

1133


How will you serialize a singleton class without violating singleton pattern?

2005


What are inbuilt functions in java?

1169


Can we use switch statement with strings?

1093


How to avoid memory leak in java?

1182