These days Java is one of the popular languages among developers. And, there is no lie in that this popularity generates tons of jobs for IT professionals. Developers that are well-versed with the Java language and have good knowledge about all the advanced concepts can find jobs in several IT companies including Wipro, HCL, Infosys, and others. If you want to get Java job opportunity in your dream company you need to be familiar with all the basic and advanced concepts and with all the interview questions type. Java interview questions are designed to test your proficiency and technical skills.
To crack the interview it’s necessary to know about the interview process of every company:
The process of java interview is quite simple and consists of three main rounds. HR, technical and system round. HR round is simple and quite similar for all the posts, while the technical round is little difficult and need expertise in different concepts. Well, prepare for the technical and system round before going to the interview, at the fresher level an interviewer may ask more about basic concepts. You can apply a lot of java fresher jobs and crack the interview
Technical round
In the technical round, an interviewer can ask about core java and advanced java concepts.  Other questions are related to projects you have done previously.

1.   Explain JDK, JRE, and JVM?

JDK- Java Development Kit. It is necessary to compile the document and package java programs.
JRE- Java Runtime Environment. It is referred to runtime environment in which Java bytecode can be executed.
JVM- Java Virtual Machine. It also provides a runtime environment that provides a run-time environment in which java byte-code can be executed.
2.   How many types of memory areas are allocated by JVM?
There are many types of memory areas are collocated by JVM:
·         Class Area
·         Heap
·         Stack
·         Program Counter Register
·         Native Method Stack
3.   What is class loader?
The classloader is a subsystem of JVM that is used to load the classes and interfaces. Bootstrap classloader, Extention, System classloader are few types.
4.   Explain the public static void main(String args[]).

Public is an access specifier mean from everywhere you can access it.

Static is a method that is associated with the class.  

Void- Void is the return type.

Main- Method Name

String args[]- It only accepts the string type arguments.

5.   Why Java is platform independent?

Platform independent simply means “write once and run anywhere”.

6.   What are constructors in Java?

In Java, constructors are a block of code which is used to initialize an object in a piece of code. The constructor has the same name as that of its class.

7.   What is the difference between Array list and vector?

The array list is non-synchronized and fast. Array list can only use Iterator for traversing an array list.

While vectors are slow and synchronized. Vector is the other class, which use both Enumeration and Iterator.

8.   Is delete, Exit, Null, Main, Exit are the keywords in Java?
No, these are not keywords.

9.   What is the difference between equals () and ==?


These operators are used in java to compare the objects to check equality but here is one difference between the two is that one is method equals () and the other is operator ==.

10.               What is a servlet?

A servlet is a java program that extends the capabilities of a server by providing support for dynamic response and data persistence.

 

11.               What is the life-cycle of a servlet?

There are 5 stages of the servlet:

  1. Servlet is loaded
  2. Servlet is instantiated
  3. Servlet is initialized
  4. Service the request
  5. Servlet is destroyed

12.               How do cookies work in Servlets?

Cookies are the small files that are stored on a user computer and they are kept for various information tracking purpose. Servlet API provides cookie support through javax.servelet.http.
HttpServeletRequest gets cookies() method is provided to get the array of cookies from a request.
And, httpServeletResponse add Cookie(Cookie c) method is provided to attach cookie in the response header, there is no getter method for a cookie.

13.               What are the different methods of session management in servlets?

Session in java servlet is managed through different ways such as cookies, httpSession, API, URL rewriting etc.

14.               Explain the steps to connect to a database in Java?

  • Registering the driver class
  • Crating connection
  • Creating statement
  • Executing queries
  • Closing connection
15.               What is the difference between getting and Post method?
GET- it requests the data from a specific resource.
POST- It submits the proceed data to the specified resource.

 

System Round:

In the system round, you need to solve some practical questions.  And need to execute some programs.

HR round Questions for Java Developers:

1.      What are your key strengths?

2.      What is one thing you want to improve about yourself?

3.      Why should we hire you?

4.      Why do you want to work with us?

5.      What is the one thing that you like about the company?

6.      What are your expectations from your first job?

These are few of the top questions you need to prepare for before going for an interview.

Start your preparation to grab the best job opportunity in your dream company.