You are on page 1of 2

Java Interview questions:

1. Important features of JAVA 8 release


Ans: Oracle released a new version of Java as Java 8 in March 18, 2014.

Java 8 Programming Language Enhancements


Java 8 provides following features for Java Programming:

o Lambda expressions,

o Method references,

o Functional interfaces,

o Stream API,

o Default methods,

o Base64 Encode Decode,

o Static methods in interface,

o Optional class,

o Collectors class,

o ForEach() method,

o Parallel array sorting,

o Nashorn JavaScript Engine,

o Parallel Array Sorting,

o Type and Repating Annotations,

o IO Enhancements,

o Concurrency Enhancements,

o JDBC Enhancements etc.


2. OOPS in JAVA
Ans:

 Data Encapsulation: Hiding the implementation details of the class from the user
through an object’s methods is known as data encapsulation. In object oriented
programming, it binds the code and the data together and keeps them safe from
outside interference.
 Public Interface: The point where the software entities interact with each other
either in a single computer or in a network is known as a public interface. This help
in data security. Other objects can change the state of an object in an interaction by
using only those methods that are exposed to the outer world through a public
interface.
 Class: A class is a group of objects that have mutual methods. It can be considered as
the blueprint using which objects are created.
Classes being passive do not communicate with each other but are used to
instantiate objects that interact with each other.
 Inheritance: Inheritance as in general terms is the process of acquiring properties. In
OOP one object inherits the properties of another object.
 Polymorphism: Polymorphism is the process of using same method name by
multiple classes and redefines methods for the derived classes.

You might also like