Author Archives: Stanislav_Panteleev

Java.Core.What are functional interfaces in Java?

🚀 What is a Functional Interface in Java? A functional interface is a special type of interface in Java that contains exactly one abstract method (though it can have multiple default or static methods). This makes it eligible to be … Continue reading →

Posted in Без рубрики | Comments Off on Java.Core.What are functional interfaces in Java?

Java.Core.Fragmentation and Regions

🌐 What is Fragmentation in Java? What causes fragmentation? When objects are allocated and then freed, they leave gaps in memory. These gaps are too small for new objects to fit, even though there’s technically free space available. Over time, … Continue reading →

Posted in Без рубрики | Comments Off on Java.Core.Fragmentation and Regions

Java.Core.How does garbage collection work in Java?

🧹 What is Garbage Collection (GC)? In Java, garbage collection is the process of automatically reclaiming memory by identifying and removing objects that are no longer reachable from your program. This means objects that your code can no longer access … Continue reading →

Posted in Без рубрики | Comments Off on Java.Core.How does garbage collection work in Java?

Java.Core.JMM

🔥 What is the Java Memory Model (JMM)? The Java Memory Model defines how threads interact through memory and what rules the JVM follows when reading/writing shared variables across threads.

Posted in Без рубрики | Comments Off on Java.Core.JMM

Java.Core.Why modern langs avoid checked exceptions ?

💡 Why Checked Exceptions Fell Out of Favor (and Modern Languages Like C# Avoid Them) 🔥 Historical Context: Why Java Introduced Checked Exceptions When Java was first designed in the 1990s, the creators believed that forcing developers to handle certain … Continue reading →

Posted in Без рубрики | Comments Off on Java.Core.Why modern langs avoid checked exceptions ?

Java.Core.What is the difference between checked and unchecked exceptions?

Here’s a clear breakdown of the difference between checked and unchecked exceptions in Java: ✅ Checked Exceptions Definition These are exceptions that the compiler forces you to handle — either by using a try-catch block or by declaring them in … Continue reading →

Posted in Без рубрики | Comments Off on Java.Core.What is the difference between checked and unchecked exceptions?

Java.Core.Does Reentrantlock flushes to RAM directly ?

🔥 Quick Recap — What is ReentrantLock? ReentrantLock is part of java.util.concurrent.locks and is a more flexible, feature-rich alternative to synchronized blocks. It allows: ✅ Try-lock (non-blocking lock attempts)✅ Timeouts (wait only so long for a lock)✅ Fairness policies (FIFO … Continue reading →

Posted in Без рубрики | Comments Off on Java.Core.Does Reentrantlock flushes to RAM directly ?

Java.Core.CachingInThreads

🔥 The CPU, Caches, and Threads — What’s Going On? 1️⃣ Each CPU core has its own local cache. This cache holds copies of variables that the thread running on that core is using. Why?Because accessing main memory (RAM) is … Continue reading →

Posted in Без рубрики | Comments Off on Java.Core.CachingInThreads

Java.Core.What is the purpose of the volatile keyword in Java?

The volatile keyword is a critical part of Java’s memory model, especially in multi-threaded programming. Let me explain what it does, when to use it, and its key limitations.

Posted in Без рубрики | Comments Off on Java.Core.What is the purpose of the volatile keyword in Java?

Java.Core. If we read null in multithread enviroment, doesn’t it mean we have no value there ?

Great follow-up! Let’s walk through this slowly — you’re thinking logically, but there’s a subtle trap when multiple threads are involved. Let me break it down step by step, and I promise this will click by the end.

Posted in Без рубрики | Comments Off on Java.Core. If we read null in multithread enviroment, doesn’t it mean we have no value there ?