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

What are loops in java? What are three types of loops?

982


How to access arraylist elements in java?

940


What is a function in programming?

982


How to overcome the exception object reference not set to an instance of object?

1098


What is parameters example?

967


What is method with example?

1015


What is unicode datatype?

919


Explain about complier design(phases)

1023


How to declare an arraylist in java?

998


What is treeset and treemap in java?

1003


How do you check whether the list is empty or not in java?

921


How do you check if a string contains only numeric digits?

1066


How a string is stored in memory?

955


Difference between current previous versions of Java?

974


What is equlas() and hashcode() contract in java? Where does it used?

1052