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 the advantages of packages in java?

1430


Can a class be private?

912


Can we create an object of static class in java?

969


How do you use compareto?

887


Mention a package that is used for linked list class in java.

902


What is the difference between JVM and JRE?

1041


How many boolean functions are there?

922


What does  mean in regex?

987


What are the string methods in java?

1025


Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?

984


Is set thread safe java?

864


What is the purpose of static methods and variables?

987


Explain different forms of polymorphism?

1096


is there a separate stack for each thread in java? : Java thread

929


Is oracle charging for java?

970