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

what is the difference between abstract class and
Interface?where we can use it in realtime projects?

Answer Posted / sudhakar

1)We define an Interface in the Java application with a
set of abstract methods without any implementation. Which
means all the methods of an interface are by default
abstract methods and public methods.
2)Once an Interface is defined in the application then any
class can implement that interface, in such case the class
must be implemented with all the mehtods of the respective
Interface otherwise the class will become as abstract class.
3)A class can implement any no. of interfaces, in such case
the class must be implimented with all the methods of those
interfaces otherwise the class will become as abstract class

Is This Answer Correct ?    125 Yes 25 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is empty string literal in java?

1002


What are constructors in java?

1030


Can we serialize arraylist in java?

966


What is the common usage of serialization? What exceptions occur during serialization?

1058


Which are the two subclasses under exception class?

1012


What are parsers? Dom vs sax parser.

991


What are the differences between heap and stack memory in java?

1004


Do extraneous variables affect validity?

879


Can we force the garbage collection to run?

902


What is difference between Heap and Stack Memory?

994


Variable of the boolean type is automatically initialized as?

974


What are some examples of variable costs?

900


Which class is used by server applications to obtain a port and listen for client requests?

917


Is null a value?

981


Is 0 a real number?

977