Sobes.tech

Do you know how to disable GC in a Java application?.

Senior
145

Analyze the performance and memory usage differences between using int[] and Integer[] in Java, especially in the context of the given code snippet: ```java int SIZE = 1000000; int[] x = new int[SIZE]; Integer[] y = new Integer[SIZE]; for (;;) { for (int i = 0; i < SIZE; ++i) { y[i] = new Integer(x[i]); } } ```

Senior
145

What is amortized complexity?

Senior
144

Write JUnit tests for RecommenderServiceImpl that cover the main functionality

Senior
141

What is a race condition? How to deal with it? Provide an example and name the ways to handle it in Java.

Senior
138

Tell me about your real-world experience with GC optimization — were there pauses lasting tens of seconds, and how did you optimize them?

Senior
138

/ ** * Find two numbers in an array whose sum equals a given number * <p> * Write a function that takes an array of positive * unordered numbers as the first argument * and a positive number as the second argument. * The function should return true if there are 2 numbers in the array * that sum up to the second argument. * <p> * Input: ([10, 15, 3, 7], 17) * Output: true */

Senior
135

What is the difference between dirty read anomalies and non-repeatable read?

Senior
127

Tell me more about how object reachability is determined in GC.

Senior
127

What is the average algorithmic complexity? Can you explain and give examples of algorithms with different complexities?

Senior
120

What will happen if multiple fields within a class are marked with the volatile modifier?

Senior
119

How to fix a violation of the dependency inversion principle — suggest a refactoring with the separation of a separate storage?

Senior
119

Provide an example of violating the property of Consistency in transactions.

Senior
117

What collision resolution methods in hash tables do you know?

Senior
117

Name two key Java keywords used in the context of multithreaded processing, and explain why volatile is needed.

Senior
114
/2