JavaRush /Java Blog /Random EN /23 questions frequently asked in job interviews
Юрий Кузнецов
Level 35
Москва

23 questions frequently asked in job interviews

Published in the Random EN group
I'll tell you quickly about myself. I am 25 years old, I was born in the Crimea, Feodosia. He studied at the city technical school, then entered Kharkiv, received a bachelor's degree and returned home in 2014. In 2014, he entered the correspondence course for a master's degree (all specialties were somehow related to programming), and in 2015 he entered the army for contract service for a period of 3 years. After two years of military service, I realized that I needed to change something in my life... 23 interview questions frequently asked - 1And then I come across CodeGym in December 2017, and I start learning Java hard. In the summer I get to Grigory's Topjava courses, I start taking each of his classes, and by mid-September the three-month courses were supposed to end. In general, in early September, I move to Moscow with my wife to look for a job as a Java programmer and have passed about 10 interviews to date. I will write to you what is constantly asked and the questions that I poured.
  1. What is JDK, JRE, JVM and compiler. This is must have. If you are asked this question at an interview and you do not answer it, most likely they will not ask anything further. small video from youtube

  2. Object oriented programming (OOP). The main thing here is to tell what polymorphism is. They may be asked to translate this word, then you need to tell its definition accordingly. You can tell everything in your own words. Then give your examples.

    Add. Literature : Polymorphism

    Video: Introduction to OOP

  3. Multiple inheritance in Java. Java forbids multiple inheritance of classes, but allows multiple inheritance of interfaces. About inheritance

  4. Methods of the Object class (it is advisable to look at each method directly in the code itself and pay attention to Equals and hashCode). I called it like this: getClass, finallize (read about it, you never know if they ask a question, but remember: as for me, THIS IS A CRUTCH), wait (it’s enough to know that there are 3 overloaded methods) notify, notifyAll, equals and hashcode (required !! !know the 4 equals rules and be sure to know the law between equals and hashCode).

    ObjectJava

  5. JVM from within. Stack and Heap memory.

    Memory

  6. What is the new keyword and how does it work. I didn’t find the material, but they asked me about it, or rather, when we write, for example

    A a = new A()

    what happens before equals and after equals?

    Before equals, we create a link, and after equals, we create a new object using the new keyword, which is placed in Heap memory as a set of bytes. (If I'm wrong then please correct me)

  7. The work of the Garbage Collection - they didn’t ask very often, but when they asked, they started to dig, as far as I know this topic. Great article here

  8. The order of initialization of the fields of the classes of the parent and child

  9. Collections: I had to tell absolutely the entire hierarchy and work of each collection.

    The question is how List differs from Set. The most important thing is to say what the List interface is. If you answer that Set is a collection with unique objects, that won't be enough.

    HashMap, HashSet - initial size; capacity, loadfactory, null is allowed or not? How is the cell for an object calculated when working with a Hash collection? The difference between HashMap and TreeMap (it is not enough to say that TreeMap is a sorted collection, according to the red-black tree algorithm). Know the insertion, deletion, search algorithms for each collection. Queue, Deque, Stack - rarely asked me questions about them. You need to know where is the interface and where are the classes in the collections.

    23 interview questions frequently asked - 2

    Note that Collections has an Iterable parent.

    link from our member)

  10. Java 8. Absolutely max out what you know about the "news" released 4 years ago : here's the source New in Java 8

    They asked me about consumers, function, etc., then they asked about functional interfaces, then they asked me how to create my own annotation, which means, for example, @SomeAnnotation (name = .... count =....), namely, what is name, count and how do they work when creating their annotation.

  11. generics . All about generics. They ask everywhere.

    Generics

  12. Threads . Thread, Runnable, what is the difference, how to start a thread. All about synchronization. Mutexes, monitors, the Lock class. Deadlock when occurs, give those examples.

  13. Hierarchy of checked/unchecked exceptions, write your own exception class.

    23 interview questions frequently asked - 3
  14. Final , finallize(again), immutable , finally . When the finally block fails.

  15. How to disable class inheritance (private constructors, final class...).

  16. IO / NIO streams.

  17. PATTERNS . Learn at least 5 basic things (mvc, factory, decorator, singleton, observer).

  18. Spring ioc, di, ioc - container. Here is a link to a practical understanding, it helped me a lot ... SPRING . I went through the spring up to chapter 16, writing all the code by hand. I advise you to do the same.

  19. Maven -> profiles, artifacts, war, jar... scope types. What parameters should be set when connecting libraries.

    MAVEN

  20. What is ORM? How does it work? (easy answer).

    Hibernate: how it communicates with the database, which must be mandatory when creating the Entity class. session. 3 levels of caching - know. How to link table and entity class. Connections:

    Many to many, one to many, etc.

    If we have a connection, for example, a User that has a lot of Book. How the field in the User class and the field in the Book class will look like (this is where the many-to-one and one-to-many annotations are indicated above the fields).

    What is JPA, how is it related to Hiber. JPACL.

    Hibernate

  21. The next question will be on SQL. Requests that you know what you used. JOIN - outer, inner, left, right.

    sql

    Task from the company: 2 tables are given, department and employee. Here is an example .

  22. Horizontal scaling .

    A short video on the topic of vertical and horizontal scaling
  23. Some html, css, js.

  24. Git. Work in the console. commit, push, what is the difference between fetch and pull.

Finally, I advise you to read this list of questions and look for answers yourself (we download the "google" skill) and write code to fix it. PS: my first article, so there will be flaws in any way, write, I will be very happy with the comments. Additional reading, if this is not enough for you:
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION