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 / ashwin khandelwal

It cannot be compiled because of weaker access privilege give to method in DerivedOne class while overidding method of Base Class

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does super keyword do?

1073


Can we synchronize static methods in java?

1104


What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?

1136


Is it possible to override the main method?

981


What is numeric data type?

989


Explain polymorphism citing an example.

1043


What is method in research paper?

1136


What is the use of conditional statement?

985


What is procedure overloading?

2313


what is difference betweem home interface and remote interface?

2634


What is a dot notation?

1035


How to do a true java ping from windows?

1158


What method is used to specify a container's layout in java programming?

1141


Explain the differences between static and dynamic variables?

1151


Can we sort a map in java?

1046