Interview Questions, Answers and Tutorials

Category: Introduction to Java

06 Introduction to Java

Java is an object-oriented programming language (OOP) developed by Sun Microsystems, which enables programmers to create flexible, modular, and reusable codes. The important feature of OOP language which help programmers achieve this are encapsulation, polymorphism, and inheritance.  Encapsulation: It is a mechanism that binds together codes and data and manipulates to keep the code safe from outside interference and misuse. Java implements encapsulation by defining the accessibility condition of variables, methods, and classes (private, protected, and public). Java’s basic unit of encapsulation is class. A class specifies the data and the code that will operate on the data. A class…