[name] asked: Why does JVM consume memory beyond the heap if we set the limit -Xmx?
Java
public static void a(long item) { b(item); System.out.println(item); } public static void b(long item) { c(item); } public static void c(long item) { d(item); } public static void d(long item) { System.out.println(item); item = 20L; // here }
[name] asked: Why store classes in Metaspace if they are already in the jar file on disk?
[name] asked: Tell about the exception hierarchy in Java.
[name] asked: How to automate the deletion of data older than 3 months?
class Task { private static int counter = 0; public static void main(String[] args) throws Exception { var thread1 = new Thread(() -> increase()); var thread2 = new Thread(() -> increase()); thread1.start(); thread2.start(); thread1.join(); thread2.join(); System.out.println(counter); } private static void increase() { for (int i = 0; i < 5000; i++) { counter++; } } }
[name] asked: Is it advisable to use the payment ID as a Timer metric tag?
[Name] asked: Kubernetes has a memory limit of 1 GB, and JVM is launched with -Xmx 1 GB. How viable is such a setup?
[name] asked: What are the main entities in Kafka, how do they interact, and what are their purposes?
[name] asked: If the topic has 100 partitions and the @KafkaListener annotation specifies concurrency=10, will 90 partitions be idle?
[name] asked: How was the caching implementation process — did you initiate it or did the architect suggest it?
[name] asked: If the load is 30,000 messages per minute, how many partitions are needed?
[name] asked: If Prometheus has a 4 TB disk, is the payment ID in the tag already normal?
[name] asked: What does 'linking' a class mean? What is the process of linking?
[name] asked: What are the standard JVM and Spring Boot metrics by default?
[name] asked: What Errors exist in Java? Provide examples.
[Name] asked: Is it possible to write catch(Error e) or catch(Throwable t) — will such code compile?
[name] asked: How many people were in the team?
[name] asked: What is OutOfMemoryError, when does it occur, have you encountered it in practice?
[name] asked: If I write a message to a Kafka topic, how many partitions will it go to?