Real Time sample code for Encapsulation and Abstraction.
where to use abstract and where to use specifies like
public private.

Answer Posted / manikandan [ gtec,vellore ]

Encapsulation is used when v need to use a data with the
object access.
Abstraction is used when v need to restrict the end user to
access all process.

Is This Answer Correct ?    1 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the two basic ways in which classes that can be run as threads may be defined?

819


What is the java project architecture?

1998


What is regex in java?

705


Why do we need data serialization?

739


What is definition and declaration?

742


Can an integer be a string?

714


What's the base class of all exception classes?

791


Explain enumeration in java?

777


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

2100


What are thread safe functions?

718


How to create packages in java?

722


Does anyone still use java?

839


Give the hierarchy of inputstream and outputstream classes.

817


What is thread pool? How can we create thread pool in java?

839


What is method reference?

722