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 does the three dot emoji mean?

1198


What is meant by polymorphism?

1070


What are the new features in java 8? Explain

998


Is static a singleton?

1024


What are the three types of design patterns?

1012


What is the epoch date?

1064


How big is a gigabyte?

1103


List some important characteristics on jre

1131


Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?

1041


What is the difference between static binding and dynamic binding?

1193


Can we access the non-final local variable, inside the local inner class?

1078


What is difference between hashset and hashmap in java?

1065


What is arrays fill in java?

1059


Do extraneous variables affect validity?

956


Can we override the private methods?

1058