View Practice Tests

Java Interview Questions Includes

  • 57 Free Interview [QA]

  • 170 Core Java [QA]

  • 82 Web Tier [QA]

  • 72 Advanced Java [QA]

Java Interview Questions

MyExamCloud Java Interview Questions Study Plan helps you to crack Java job interviews. Prepare with one of the best Java Interview Course developed by Java Experts. 100% Quality Guarantee.

Java Interview Questions are available online at MyExamCloud Exam Simulator training platform. This course contents can be accessed from PC, Mac, iPhone ®, iPad ®, Android ™ Device. Mobile Apps available on iTunes and Android stores.

What is inside?

Inside MyExamCloud's Java Interview Questions Practice Course

  1. 1

    Set Your Goals

    Set Goals on Java Interview Questions exam topics (MyExamCloud PPA Tracker)

  2. 2

    Java Interview

    Free Java Interview Questions [57 Question & Answer]

  3. 3

    Core Java Questions

    Java Interview Questions - Core Java Interview Questions [170 QA]

  4. 4

    Web Tier Questions

    Java EE Interview Questions - Web Tier Interview Questions [80 QA]

  5. 5

    Advanced Questions

    Java EE Interview Questions - Advanced Java Interview Questions [72 QA]

  1. 6

    Topic Based Questions

    Focus lab to pinpoint your weak areas, it will help you to complete your self-preparation

  2. 7

    Answer with Explanation

    Java Interview questions, along with exhaustive explanations.

  3. 8

    Exam Report

    MyExamCloud reports to assess performance history, strengths & weaknesses

  4. 9

    Focus Lab

    MyExamCloud focus lab to pinpoint your weakness areas

  5. 10

    Lifetime License

    MyExamCloud platform gives you unlimited lifetime access, any where, any time and any device (Smart Phones / Tablets)

The Java Interview Questions and Answers are created by highly experienced Java experts. The Authors have created this online course covering all Core Java and Advanced Java topics based on latest versions.

Java Interview Information

The Java Interview start with tell about yourself where you need to explain more about your professional experience.

The ultimate goal of this question during the interview is to find out enough about you to decide if you’re a good fit for the job.

The interviewer will be expecting you to open up. This question is always asked as the first Q in most of the interview sessions. Your answer here will also set the tone for the interview and let you lead with your strongest selling points.

How to Answer?

You must keep it focused and short, ideally less than a minute, and no more than 2 minutes. Prepare well and try a concise, enthusiastic response that summarizes your big-picture fit for the job. This is also a good opportunity to share some information about your proudest achievements and goals.

Key points to share

What are your primary selling points for this job?
Talk about number of years of experience in a particular industry or area of specialization.

Highlight special training and technical skills here
Focus more on the qualifications in the job description and how you meet and exceed the requirements.

Why are you interested in this position right now?
You can wrap up your answer by indicating why you are looking for a new challenge and why you feel this role is the best next step.

Who You Are?
Your first sentence should be an introduction to who you are professionally, an overview statement that shows off your strengths and gives a little sense of your personality too.
Example: "I’m an expert in making Enterprise Applications with 3 years of experience in Java EE design and development with Oracle Java Programmer and Architect Certifications — for banking applications — for Fortune 500 companies."

Talk about your expertise
Don’t assume that the interviewer has closely read your resume and knows your qualifications. Use your elevator pitch to briefly highlight 2-4 points that you think make you stand out.
Example:"I have spent the last six months developing my skills as a Junior Architect for EPractize Labs Software., where I have won several performance awards and been promoted twice. I love managing teams and solving product issues."

Why You’re Here?
Conclude by telling them you want the position and why.
Example:"Although I love my current role, I feel I’m now ready for a more challenging assignment and this position really excites me."

How to Answer Strength and Weakness

Personal weaknesses are okay sometimes, but what interviewer really looking is about your weaknesses in the work place and how you’ve overcome them.

First know your weakness (es)

To avoid mentioning a weakness that can crush your chances of landing the job, review the job description to see what exactly the employer is looking for.

Talk about how you’ve conquered the weakness.

Be prepared to share an example of a previous failure or weakness that you’ve successfully turned into a strength,

For example, if you say that you used to complete a work little bit later than your team members. You should say that your deliverable is good quality than others and appreciated by your manager except your time. Finally, say about how you have improved your timely delivery later and impressed your manager.

Know your Strengths

Note down your strength related to your job description and impress your interviewer by showing your interest in the job.

  • Enthusiasm to learn new technology
  • Creativity in your project assignments and new research
  • Patience to interact with your clients
  • Respectfulness to your team and clients
  • Dedication to your project

Java Interview Sample Questions

The following practice question is taken from MyExamCloud Java Interview Questions Study Plan.

Question:

What is the difference between GenericServlet and HttpServlet?

Answer:

  1. The GenericServlet is an abstract class that is extended by HttpServlet to provide HTTP protocol-specific methods. But HttpServlet extends the GenericServlet base class and provides a framework for handling the HTTP protocol.
  2. The GenericServlet does not include protocol-specific methods for handling request parameters cookies sessions and setting response headers. The HttpServlet subclass passes generic service method requests to the relevant doGet () or doPost () method.
  3. GenericServlet is not specific to any protocol. HttpServlet only supports HTTP and HTTPS protocol.

Question:

What is difference between ArrayList and vector?

Answer:

  1. ArrayList is NOT synchronized by default. Vector List is synchronized by default.
  2. ArrayList can use only Iterator to access the elements. Vector list can use Iterator and Enumeration Interface to access the elements.
  3. The ArrayList increases its array size by 50 percent if it runs out of room. A Vector defaults to doubling the size of its array if it runs out of room
  4. ArrayList has no default size. While vector has a default size of 10.

57 Java Interview Questions - Free

You can access 57 Java Interview Questions from MyExamCloud Exam

Take Free Practice Test

Frequently Asked Java Interview Questions

The interview questions depends on experience level and employer job description.

Case #1: Java Engineers ( 0 - 2 Years)

[[ SINGH REPLACE THE BELOW IMAGE WITH SOME OTHER ONE]]

https://qph.ec.quoracdn.net/main-qimg-f9bbb40b846c148c4b035079f3a2f576

  • What is a Class?
  • What is an Object?
  • What is the difference between constructor and method?
  • Is Java supports multiple inheritance?
  • What is an abstract class?
  • What is an interface?
  • When do we use abstract class and interface?
  • How many abstract methods an abstract class can define?
  • What is the default access modifier for interface methods?
  • What is this refers in Java?
  • What is super refers in Java?
  • What is encapsulation?
  • What is an abstraction?
  • What is inheritance?
  • What is polymorphism in Java?
  • What are primitive types?
  • What are wrapper classes?
  • What is auto boxing?
  • What is auto unboxing?
  • What is pass by value?
  • What is pass by reference?
  • What are generics?
  • What are lambda expressions ? (Java SE 8)
  • What are the ways to implement Java Threads? (by extending Thread or by implementing Runnable interface)
  • What is the only one method defined in Runnable interface? ( run method)
  • What are the difference between String and StringBuffer?
  • What is StringBuilder?
  • How to extract partial characters from a String?
  • What are arrays?
  • What are Java Collections?
  • What are the difference between arrays and Java Collections?
  • What is the difference between Vector and ArrayList?
  • What is the difference between HashMap and HashTable ?
  • How to sort a collection?
  • How get current system time?
  • What is Java Property file?

If your employer requires JDBC skills, you may expect following questions:

  • What is JDBC?
  • What are JDBC drives?
  • What is Connection?
  • How to obtain a connection?
  • What is DAO pattern?
  • What is Statement?
  • What is PreparedStatement?
  • What is ResultSet?
  • What are scrollable ResultSet?
  • What are database tables?
  • Write a simple insert SQL query?
  • Write an update SQL query?
  • Write a joint query?

If your employer requires JPA skills, you may expect following questions:

  • What is JPA entity?
  • What are requirements to define an entity class?
  • What is primary key?
  • What is JPA query language?
  • What is criteria query language?
  • What are the relationships we can define in JPA?

Case #2: Java Engineers ( 3 - 5 Years)

You are more likely tech lead or senior Java engineer working on Java EE application development. There may be chances of questions in core Java as well along with following Java EE questions.

Java EE Interview Questions

  • What are Java Servlets?
  • What is GenericServlet?
  • Servlet life cycle methods.
  • What are Java EE containers?
  • What is HttpServlet?
  • Difference between doGet and doPost methods in a Servlet?
  • How to call a Servlet from HTML?
  • What is session tracking?
  • What are the ways we can track HTTP Session in a Servlet?
  • How to save an object in a user session?
  • What are Java Servlet Filters?
  • What is the name of web deployment descriptor file ? (web.xml)
  • How to define a Servlet in web.xml?
  • What is the annotation to define a Servlet?
  • What are JSPs?
  • Difference between JSP and Servlet?
  • What is scriptlet tag in JSP?
  • What is declarative tag in JSP?
  • What is EL in JSP?
  • How to include another JSP in a JSP?
  • Lifestyle methods of a JSP.
  • What are Java Beans?
  • What is JPA?
  • What are EJBs?
  • Difference between Java Bean and EJB?
  • Types of EJB.
  • What is a Transaction in EJB?
  • How to define declarative security in web.xml?
  • How to define declarative security in EJB.
  • What is the difference between stateful and stateless session beans?
  • What is Singleton session bean?
  • Which package is used for implementing JSON based web services? (JAX-RS)
  • Which package is used for implementing SOAP based web services? (JAX-WS)
  • What is MVC pattern?
  • What are the web application frameworks you have used in your projects?
  • What is JSF?
  • What are patterns?
  • What is Singleton pattern?
  • What is Front Controller pattern?

Case #3: Java Engineers ( 6 - 11 Years) for Architect Position

Java Architect Interview Questions

You can expect lot more questions related to architecture, pattern. frameworks, best practices, deployment, hardware sizing, security, attacks… etc.

Interview Questions Topics

  • Java String
  • Java GC
  • Java RMI
  • Java OOP
  • Java Design Patterns
  • Java Configuration
  • Session Tracking
  • Java Interfaces
  • Java Collection
  • Java Threading
  • Java Architecture
  • Servlet
  • JDBC
  • Java Constructor
  • Java Networking
  • Java Abstraction
  • JSP
  • Java Basic
  • Java Exception
  • Java Static
  • Java Keywords
  • Java Enumeration
  • Java Variables
  • Java Parallelism
  • Java Datatypes
  • Java Constuctor
  • Java String
  • Java Networking
  • Java Threads
  • Java GC
  • Java Abstraction
  • Java RMI
  • Java OOP
  • Java Data Types
  • Java Design Patterns
  • Java Basic
  • Java Static
  • Java Configuration
  • Java Keywords
  • Java Enumeration
  • Java Interfaces
  • Java Collection
  • Java variables
  • Java Parallelism
  • JDBC
  • Java Exceptions
  • Java Architecture
  • Java Webservices
  • JPA
  • EJB
  • JSF
  • Session Tracking
  • JSP
  • Servlet

Related articles

Testimonial

testimonial user profile image
Thanh son Le

facebook

I found the Training Lab Exams to be fantastic! The questions were more intense than the actual exams. It has become a common practice for the training staff at our company to recommend your products. Thanks!