Table of Contents
Java is one of the most popular programming languages, which is excellent for a large number of projects. Today, according to statistics, 35% of developers choose Java as their primary language for work.
This language is used for artificial intelligence, virtual reality, big data, continuous integration, analytics, mobile devices, chatbots, and social networks. Java also comes to the rescue with microservice-related projects.
Hiring a Java specialist has some difficulties and specific requirements. This article will go over a detailed list of questions and describe the expertise to be expected from such a specialist.
Who is a Java developer and what do they do?
It is the responsibility of a Java developer to create applications written in Java. Depending on the specifics of the project, daily tasks can vary significantly. In some cases, a Java developer may need to know additional related languages, such as Kotlin.
Among the tasks of such a specialist may be:
- updating the product, for example, transferring a monolith to microservices;
- development of architecture, software modules, Enterprise Application Integration (more relevant for Senior level specialists and above);
- testing the written code;
- support for existing code;
- implementation of functions in accordance with business requirements;
- refactoring of old code.
One of the features of this position is interaction with the customer and the development team.
What are the qualification requirements for a Java developer?
Let’s start with education. Most often, such a specialist is expected to have higher technical education in computer science, computer engineering, or related fields. But qualification courses are perceived quite well when switching professions. In the future, professional development will be secured by certificates, for example, from Oracle.
Other qualification requirements for Java specialists include:
- Databases: Working with various types of databases is a must for Java developers.
- Frameworks: Among the most popular are Spring and Quarkus; such ready-made solutions are required to use during development.
- Version Control Systems (Git): Proficiency with this tool is a must.
Additional requirements include:
- Message Broker: This is not a requirement but is listed as a desirable skill in many companies.
- Basic understanding of architectural decisions: this refers to the middle specialists who work with microservices.
- Knowledge of Linux: the more operating systems a specialist works with, the better.
Among other tools and technologies that help in work, knowledge of which is required even at a basic level is Docker, Kubernetes, CI/CD processes.
Java developer interview questions
We at StaffingPartner have an extensive background in conducting interviews with java developers. In 2021 alone, we hired more than 90 specialists in this field. Therefore let’s go over the main questions considered in an interview with Java developers of different levels according to our experts.
A junior Java developer is a specialist with up to 2 years of work. It can also be a graduate of specialized courses or an educational institution. Despite little experience, such a specialist should have an extensive knowledge base. In addition to a deep understanding of the principles of OOP, knowledge of at least one operating system is required, as well as experience with SQL and a good knowledge of databases.
General and core questions
- What design patterns do you know? Give examples from your work.
- What is JVM, JDK, JRE? How are they used?
- What is a stack trace? How to get it?
- What types of constructors do you know?
- Name all ways of a class object.
- What is OOP? List principles with examples.
- Compare OOP and procedural programming.
- Tell us about the principle of inheritance in OOP?
- How does polymorphism work? What is abstraction?
- What is SOLID? Give examples.
- What is a class, object, interface?
- Create a default constructor in the derived object if it is not defined in the base class (but another constructor is defined).
Libraries and Standards
- What is Hibernate? What is the difference between JPA and Hibernate?
- Tell us about cascading and its use in Hibernate.
- What is an entity manager? What is the responsible for?
- What are the ways to create a String object? Where is it created?
- How to compare two tapes in Java and/or sort them?
- How to turn a tape into an array of bytes and vice versa? Write code for this problem.
- What GOF templates are used in the tape pool?
- What’s the difference between String, StringBuffer, and StringBuilder?
- What is Enum?
- Is it possible to create an Enum without object instances?
- Are ordinal() and compareTo() methods related in Enum? How exactly?
- Write an Enum example.
- What is a Stream in Java?
- Define properties and transaction isolation levels.
- What is the difference between a Statement and a PreparedStatement?
- What is the hierarchy of collections in the Java Collection Framework?
- Describe the internal structure of ArrayList and LinkedList.
- How to sort a collection of parts?
Class object. Equals and HashCode
- Why use Equals and HashCode in Java?
- What happens if you don’t override Equals and HashCode?
- What is a collision in HashCode? How to fight her?
- What is the peculiarity of the clone() method with the fields of an object of type-reference?
- What is the difference between using if(obj instanceof Student) and if(getClass() == obj.getClass())?
- What is the difference between error and exception?
- What does the exception hierarchy look like?
- What possible ways of handling exceptions do you know?
- Write an example of catching and handling an exception using your own exceptions.
- What are the rules for checking for exceptions during emulation?
- What tools for working with multithreading do you know?
- What is the process and flow? How is a process different from a thread?
- How to exchange data between threads?
- There are T1, T2, and T3 streams. How to implement their sequential execution?
- Given List<String> names. Remove the first letter from each name and rotate the sorted list.
- Check if the tape is a palindrome.
- Write a simple sorting algorithm (Bubble, Selection, or Shuttle). How can it be improved?
Work experience should be at least 2-3 years, participating in at least 3-4 projects. In addition to knowledge of Java and Java EE, one also needs to have the ability to work with unit testing tools and have a solid understanding of at least one framework. The specialist must also understand the principles of testing and have the ability to participate in all stages of the software development process. That is, they must be a full-fledged engineer capable of writing and maintaining high-level code.
General questions and knowledge of OOP
- What is the difference between aggregation and composition?
- What is a proxy object? Give examples.
- What is High Cohesion and Low Coupling? Give examples.
- How can I implement multiple imitations in Java?
- What is the difference between static and dynamic binding in Java?
- Define what is: Run-Time Data Areas and immutable objects?
- What is type covariance?
- What methods exist in the Object class?
- Is it possible to import the same package/class twice? What consequences?
- Why do modern frameworks mostly use only unchecked exceptions?
- What is the difference between the java.util.Collection and java.util.Collections classes?
- How do static and final modifiers affect serialization?
- What is the working principle and memory area of the Garbage Collector?
- How does the Garbage Collector work? Tell us about Reference counting and Tracing.
Libraries and Tools
- How are Maven, Ant, Gradle tools used?
- What is Spring core, and why is it needed? Expand the concepts of Inversion of Control and Dependency Injection.
- How does @Transactional and Spring work under the hood?
- What are the advantages and disadvantages of using multithreading?
- What is ThreadLocal, and why is it needed?
- What is a deadlock?
- What is a race condition?
- What is and why to install daemon threads?
- How to implement a thread pool?
- What is the difference between List and Set?
- What is the difference between HashSet, LinkedHashSet, and TreeSet?
- What is the internal structure of a HashMap?
- What is the difference between HashMap and TreeMap? When and where should they be used?
- What are the methods in the Stream interface?
- How is the map method different from flatMap?
- What functional interface does the filter method use?
- How are one-to-one, one-to-many, and many-to-many ratios stored in tables?
- What are database normalization and denormalization? Give examples of a real project.
- What are the types of indexes in the database?
- Given: String s. Define: the length of the maximum substring without repeating characters.
- Determine if a singly linked LinkedList is a palindrome.
This is a Java developer with at least 4 years of experience. Among their key skills are the ability to work in different Java environments, knowledge of security patterns, working with various databases, as well as architectural and distributed design patterns. The main pool of responsibility of a specialist of this level is the corporate integration of the project, with writing and maintaining high-performance and testable code.
- When is it better to use imitation rather than aggregation?
- Explain how Kubernetes works.
- What is the difference between Lambda and anonymous class?
- Tell us about the Java Memory Model.
- Describe the life cycle of a Java object. How does an object move from one Garbage Collector memory area to another? What is the trigger for such a transition?
- What kinds of Garbage Collector are available in HotSpot? How do they work?
- Tell us about the features of serialization in Java. Why serialVersionUID and InvalidClassException?
- What are tree traversal algorithms, and why are they different?
- What is a deadlock? What types exist? Draw this diagrammatically.
- Tell us about ACID?
- What does the CAP theorem mean?
- What are the pros and cons of using an ORM?
- What is the n+1 problem?
Libraries and Tools
- How to build monitoring in Java? Tell us about the features of using Java micro metrics or DropWizard or Prometheus frameworks.
- How does an ORM work?
- What methods of data sampling in Hibernate do you know?
- What is IoC and DI?
- What is the lifecycle of the objects that Spring creates?
- What are the types of contexts?
- What features does Spring provide for communicating with the database?
- What are the signs that a class is a Java Bean? How is a POJO different from a Java Bean?
- What is a race condition?
- What are optimistic and pessimistic locking?
- What are the main principles of the Stream API?
- Implement a service that works asynchronously (receives a request, saves data to the database, and responds outside of httpResponce).
A Java Architect is someone qualified to achieve the long-term goals of a project. In addition to all the skills of a senior Java developer, the architect must also be able to communicate with the team, guiding them as they work. Java Architect must also be able to work in conjunction with the management of the company and/or the customer to develop and implement software system solutions.
- What is the key difference between Hibernate and JDBC?
- How do you resolve technical conflicts within the team?
- Where should you start improving your application?
- How to avoid database deadlock?
- What is sharding, why should it be used?
The modern market for Java developer candidates is growing but still does not fully cover the need for them. The expertise and skills of such specialists are pretty high, which means that interviewing them is not an easy task.
Before starting the search, you should clearly understand the requirements of the project and consult with other participants in the development process, only after that proceeding with the search itself.
We at StaffingPartner have extensive experience in finding specialists of any level around the world. In addition to recruiting, we also offer technical assessment specialists to assist you in conducting technical interviews. Contact us to get a consultation!
Almost half of all US companies (43%) are outsourcing IT-related tasks today. 58% of these companies noticed only a slight difference in the quality of the provided services compared to…read more
25,9 million people in the US are part-time employees as of 2022. It is 17% of the total workforce. In the Netherlands, part-time employment has grown to 51%. We can…read more