Java Programming and Technical

Q. What are Encapsulation, Inheritance and Polymorphism?

A. Encapsulation is the mechanism that binds together code and data it manipulates and keeps both safe from outside interference and misuse. Inheritance is the process by which one object acquires the properties of another object. Polymorphism is the feature that allows one interface to be used for general class actions.

Read Solution (Total 2)

Java Other Question

Q. Why there are no global variables in Java?

A. Global variables are globally accessible. Java does not support globally accessible variables due to following reasons:
1)The global variables breaks the referential transparency
2)Global variables creates collisions in namespace
Q. What is the use of bin and lib in JDK?

A. Bin contains all tools such as javac, appletviewer, awt tool, etc., whereas lib contains API and all
packages