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 / srinivas battula

Java is Pure OOPS... Try writing a java program without
Class. i.e. public class Test {}, In this way it satisfies
Oops Concept.
Abstraction: Take any thing like static, system,etc. we
don't know the internal functionalities, but by calling
them we are achieving the task. Here it is hiding the
complexities but representing essential features.
Encapsulation: By writing a program you are grouping all
the methods, variables,etc there by satisfying Encapsulation
Inheritence: When reusability occurs, you satisfy this
concept.
Polymorphism: We achieve it through Overloading and
Overriding in Java in most of the concepts.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is null a string or object in java?

918


Is it possible to compare various strings with the help of == operator?

923


Which is illegal identifier in java?

1017


Is constructor inherited?

912


What is a numeric string?

960


What is a ternary operator in java? What is an interface?

942


What do you understand by a Static Variable?

1138


What restrictions are placed on method overriding?

1099


How do you sort a list in java?

975


What is an infinite loop?

1129


can rmi and corba based applications interact ?

1019


How can you set the applet size?

992


Write a program to print 15 random numbers using foreach of java 8?

888


Is an array a vector?

961


Why we do exception handling in java and how many types of exceptions are there?

1043