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

Explain public static void main(string args[]) in java.

990


Explain the difference between a Thread and a Process.

1000


How to find the given number is a prime number or not by getting input from the user

1100


What is a flag and how does it work?

1010


what are different ways in which a thread can enter the waiting state? : Java thread

966


How will you print number in reverse (descending) order in BST.

982


What is substring in java?

1227


Explain jvm, jre, and jdk?

1017


what is the difference between future and callable interface in java?

1236


What do you mean by data type?

1022


Difference between notify() method and notifyall() method in java?

973


What is the list interface in java programming?

1120


What is a method in programming?

1188


What is a priority queue java?

994


What is the static method?

1077