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

we know that every java prog must follows OOPS Principles.
Anybody can answer, HOW THE FOLLOWING PROGRAM FOLLOWS OOPS
CONCEPTS i.e, Inheritance,Polymarphism,Encapsulation?
class a{
public static void main(String args[]){
System.out.println("Hello World");
}
}

Answer Posted / sree

Inheritance: Every class is extended of Object class, so in
here a extends Object. this is Inheritance.

Polymorphism: means single entity multiple views.
here only one method is there. if here multiple views, then
only it would become like Polymorphism concept.

Encapsulation: Wrapping up of data and code means methods,
variables, code, and all. every java program is based on
Encapsulation concept.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How are observer and observable used in java programming?

978


What are different types of classloaders?

985


Is java 1.7 the same as java 7?

993


Under what conditions is an object’s finalize() method invoked by the garbage collector?

988


What happens if we don’t override run method ?

952


Can You Have Virtual Functions In Java?

1092


What is the access scope of protected access specifier?

940


What will happen when using pass by reference in java?

941


what are the high-level thread states? : Java thread

961


What is initial size of arraylist in java?

1005


What are conditionals and its types?

1084


Justify your answer that you can't define a method inside another method in java, if you can then how?

1096


What is the purpose of the main method?

951


What is the purpose of lambda expressions?

1007


What is array in java?

957