You are here

Java interview questions

Java interview questions

java logo

As we mentioned in our previous articles, facing an interview is a stressful job. It doesn’t matter if you are experienced or not, we all feel anxious before an interview.

In today’s article we will talk about Java Interviews. Our advice is that if you are not good at programming, do not apply for such an interview.

What does Java mean?

Java is a platform independent programming language also called OOP (Object Oriented Programming). This language was discovered by James Gosling in 1991.

Java represents one of the most used programming languages in the world. Java platform is being used for making phone, tablets, and desktops applications and for more other IT devices. The request for Java workers has increased and this is an emerging market.

Enough describing Java. If you want to apply for a java interview you should already now this information.

There are java interviews for juniors and for seniors. Let’s take the junior java interviews:

Usually, junior java interviews are structured in four different parts:

  • Technical part writing
  • Logical test, writing
  • Interview with a Human Resources delegate
  • Interview with future boss

Java interview questions

Examples of java interview questions:.

Example 1) Define the concept of polymorphism

Answer: The same name can refer to two different methods: Overloading and Overriding.

Example 2) what does encapsulation mean?

Answer: The objects classes’ characteristic to group together under the same structure the data and the methods applicable to them.  It also separates the private and public data.

Example 3) what is Java inheritance?

Answer: It’s a characteristic through which an objects class can use the properties and methods of another class and add its own functionality.

Example 4) what is an “abstract class”?

Answer: A class that is defined by using the keyword: “abstract”. It doesn’t allow objects of its prototype to be created.

Example 5) what is the difference between “set and list”?

Answer: In “set”, the elements are unique.

Example 6) how are parameters transmitted in Java?

Answer: Trough value.

Example 7) what’s the “Exception class’s superclass”?

Answer: Its superclass is Throwable which has two underclasses: Exception and Error.

Example 8) what is a “finally block”?

Answer: The code in finally block will always be executed.

Example 9) what is marker interface?

Answer: Marker interface is a design pattern; it provides a way to associate metadata with a class where language doesn’t have explicit support.

Our last java interview questions example is: “What is immutable object?”

Answer: An immutable object once created, can’t be modified.

There are hundreds of java interview questions and maybe in our future articles we will present some more.

If you don’t know how to work in java but you want to learn, we would recommend “Effective Java” by Joshua Bloch.

 

Copyright protected to Grook.net - Java interview questions

Forums: