Java Developer Interview Questions | Glassdoor.ca

Find jobs for Java Developer

Java Developer Interview Questions

385

Java developer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

What is a singleton?

2 Answers

A Singleton class has only one object that is returned by it. One would question it's use : It is a design pattern and used in frameworks like Spring MVC while loading the beans using the configuration metadata. The idea is outside of the Singleton class, whenever an object is created, it is the only object created. Obtaining an object is also through a static method (and not a constructor - as we declare a default private constructor for a singleton class to block new keyword-based object creation) which returns an instance of the class. If already created, it returns the initialized object.

A Singleton class has only one object that is returned by it. One would question its use : It is a design pattern and used in frameworks like Spring MVC while loading the beans using the configuration metadata. The idea is outside of the Singleton class, whenever an object is created, it is the only object created. Obtaining an object is also through a static method (and not a constructor - as we declare a default private constructor for a singleton class to block new keyword-based object creation) which returns an instance of the class. If already created, it returns the initialized object.

Programming question about Stack.

2 Answers

What are you top 3 weaknesses and your top strength?

2 Answers

Typical Java technical questions. Like how to generate a deck of cards and then shuffle them.

2 Answers

Are you willing to travel?

2 Answers

what data structure is used in Hashmap?

1 Answer

1.find peaks and valley in given series of no's. 2.small project : design a program to simulate fight between 2 teams.

1 Answer

JAVA What is Encapsulation? What is Inheritance? What is the difference between overloading and overriding? What is polymorphism? What is the difference between an Abstract class and an Interface? What is an immutable object? What is the difference between a Set, List and Map? Name a collection that is thread safe? (Vector) What are two ways to implement a Thread in Java? What is a servlet? What is String Builder used for? DATABASES How does JDBC make a query? What is a left inner join? What is an outer join? What is aggregation? Give an example of a SQL query that uses aggregation? DESIGN PATTERNS What is the MVC design pattern? What is the Facade design pattern? What is the Decorator design pattern? HTTP What is the difference between JSON and XML? What are the 7 HTTP request methods? (GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT) What is the difference between SOAP and REST? SPRING What is dependency injection in Spring? Several other questions on spring..

1 Answer

Given 2 arrays, print an array with all integers that exist them them. Count duplicates and ordering does not matter.

1 Answer

Reverse each word in the a string, but do not change the ordering.

1 Answer
110 of 385 Interview Questions