What are optimistic and pessimistic locking? How to implement them?
Java
How do hash indexes differ from B-tree indexes? Which is preferable for searching by last names?
What is the fork system call in Unix-like operating systems?
public class ClassA { int a; @Override public boolean equals(Object obj) { //implementation if (this == obj) return true; if (!(obj instanceof ClassA)) return false; ClassA other = (ClassA) obj; return this.a == other.a; } } public class ClassB extends ClassA { int b; @Override public boolean equals(Object obj) { //implementation if (this == obj) return true; if (!(obj instanceof ClassB)) return false; if (!super.equals(obj)) return false; ClassB other = (ClassB) obj; return this.b == other.b; } } ClassB b1 = new ClassB(10, 20); ClassB b2 = new ClassB(10, 20); assertTrue(b1.equals(b2));
—SEPARATOR—
Is it possible to use a try-catch construct without specifying a catch block, and in which cases is this permissible?
How to accept a POST request with JSON on the Spring side? When does JSON convert to DTO?
Which command helps optimize queries in PostgreSQL?
Can tests be improved, for example by reducing the amount of code?
How does valueOf differ from fromString?
How would you build the process of onboarding a junior into a large monolith?
What methods can be used to prevent the use of pessimistic locking in Java applications?
What are the disadvantages of the current approach of sorting the entire list each time getTop is called?
What contributes to the speed of data transfer in gRPC?
Is it possible to optimize the stack for memory so that there is no x2 consumption?
What salary expectation are you considering for the offer?
Is mastering new technologies an important aspect of candidate evaluation?
How did you manage to move abroad and work in Cyprus? What motivated you during relocation?
Каким образом TreeMap self-adjusts для обеспечения сбалансированности и эффективности работы?
How to run this code in multiple threads? Why can parallelStream() be dangerous?