How OOPS concept is achieved in Java?

Answer Posted / kk

Encapsulation,Inheritance,Polymorphism are OOPS principles.

In Java, these OOPS principles are achieved as follows:

Encapsulation & data hiding is achieved thru access modifiers

Inheritance is achieved thru Interfaces

Polymorphism is achieved thru overloading of methods

Is This Answer Correct ?    43 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the difference between thread and runnable types? : Java thread

542


When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?

540


how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion... ANS:--- >executeupdate method is having boolean return type, if anything goes wrong in data insertion or data updation, it would return false. otherwise, if it successfully inserts data into the database, it would return true NOW HOW TO I CHECK IN MY DURING EXECUTION WHETHER IT RETURNS TRUE OR FALSE... WELL IT WILL DISPLAY ANY MESSAGE OR NOT

1847


What is instance example?

521


What package is math in java?

530






What is the primitive type byte?

576


How do you convert boolean to boolean?

518


How does split work in java?

528


Will set allow duplicates in java?

497


Explain about the select method with an example?

587


Can you explain the usages of class.forname()?

603


how to create constants in java?

602


What is bytecode in java ?

604


What are controls and their different types in awt?

598


What are annotations in java?

619