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

How do you escape a string?

971


What is the reason behind using constructors and destructors?

1046


What is a classloader in java?

999


What is the difference between hashmap and hashtable in java?

1101


What is a stringbuffer?

950


Explain public static void main(string args[]).

1159


What is native method in java?

1046


What is a line separator in java?

958


What is join () in java?

952


What is java and why do we need it? Explain

1104


Can we override the static methods?

1016


What is downcasting?

1085


How is string immutable in java?

1013


What is the purpose of the runtime class in java programming?

1043


Why do we need data structure in java?

1051