Do you know how to disable GC in a Java application?.
Java
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]); } } ```
What is amortized complexity?
Write JUnit tests for RecommenderServiceImpl that cover the main functionality
What is a race condition? How to deal with it? Provide an example and name the ways to handle it in Java.
Tell me about your real-world experience with GC optimization — were there pauses lasting tens of seconds, and how did you optimize them?
/ ** * 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 */
What is the difference between dirty read anomalies and non-repeatable read?
Tell me more about how object reachability is determined in GC.
What is the average algorithmic complexity? Can you explain and give examples of algorithms with different complexities?
What will happen if multiple fields within a class are marked with the volatile modifier?
How to fix a violation of the dependency inversion principle — suggest a refactoring with the separation of a separate storage?
Provide an example of violating the property of Consistency in transactions.
What collision resolution methods in hash tables do you know?
Name two key Java keywords used in the context of multithreaded processing, and explain why volatile is needed.