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

Explain with example the concept of constant variable in java.

1098


Is it possible to write a regular expression to check if string is a number?

971


What is the declaration statement?

887


What is a parameter in simple terms?

937


How can we break singleton in java?

902


What is argument in java?

983


Is .net better than java?

962


Can final class have constructor?

863


How do you get the length of a string in java?

939


Difference between arraylist and vector.

1056


What is a lambda expression ? What's its use ?

1047


What is the current version of java?

976


Which is bigger float or double?

919


What do you meant by active and passive objects?

1017


Is it possible for a yielded thread to get chance for its execution again?

892