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...

I Have a class abstract with one abstract method, so that
method should override in the subclass, but i dont want to
override, if i am not override what will happen? If
compilation will occur then i dont want to give compilation
error, then what we need to do???
See the sample program.
public abstract class AbstractExample {
public abstract void sampleMethod();
}
public class AbstractExampleImple extends AbstractExample {

}

Answer Posted / shreya tanavade

if you dont want to override the abstract method i.e. SampleMethod ,then you must declare the subclass as ABSTRACT..i.e.declare....public declare class AbstractExampleImple ...otherwise it wuld throw compilation error

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the final variable?

1186


What are unchecked exceptions in java?

999


What is the significance of listiterator?

1034


What is java command?

1028


What is ellipsis in java?

1025


Is 0 a prime number?

939


Name few java.lang classes introduced with java 8 ?

945


Explain java code for recursive solution's base case?

986


Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?

938


What is javac in java?

961


What is singleton class in java and how can we make a class singleton?

1096


Why are the objects immutable in java?

952


What is a singleton factory?

919


What is the difference between I ++ and ++ I in java?

940


What is variable explain with example?

1010