Author Archives: Stanislav_Panteleev

Java.Core.What is the difference between String, StringBuilder, and StringBuffer?

Perfect — this is another super common interview question, and understanding this difference is key for writing efficient and thread-safe string manipulation code in Java.

Posted in Без рубрики | Comments Off on Java.Core.What is the difference between String, StringBuilder, and StringBuffer?

Java.Core.SingletonePattern

🌐 What is the Singleton Pattern? Singleton is a creational design pattern that ensures: Only one instance of a class can exist. That instance is accessible globally.

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

Java.Core.What is the difference between an interface and an abstract class?

This is another core Java interview favorite, so let me break down the differences between an interface and an abstract class in a way that’s easy to remember — and with some practical tips on when to use which.

Posted in Без рубрики | Comments Off on Java.Core.What is the difference between an interface and an abstract class?

Java.Core.How does Java handle exceptions with try-catch-finally?

🌪️ What is try-catch-finally? This is Java’s exception handling mechanism to catch errors that happen during runtime and gracefully recover (instead of crashing the program). try — Code that might throw an exception. catch — Code that handles the exception. … Continue reading →

Posted in Без рубрики | Comments Off on Java.Core.How does Java handle exceptions with try-catch-finally?

Java.Core.What is an immutable object? Provide examples.

💎 What is an Immutable Object? An immutable object is an object whose state cannot be changed after it’s created. All fields are final (or effectively final). No setters (modification methods). If it contains references to mutable objects, those references … Continue reading →

Posted in Без рубрики | Comments Off on Java.Core.What is an immutable object? Provide examples.

Java.Core.Explain the differences between ArrayList and LinkedList?

🔗 ArrayList vs LinkedList — Quick Summary Feature ArrayList LinkedList Internal Structure Resizable array Doubly linked list (nodes point to next & previous) Access Time (get(index)) ✅ Fast (O(1)) — direct access by index ❌ Slow (O(n)) — traverse from … Continue reading →

Posted in Без рубрики | Comments Off on Java.Core.Explain the differences between ArrayList and LinkedList?

Java.Core.What is StringBuilder?

🚀 What is StringBuilder? StringBuilder is a mutable class in Java that is used to create and manipulate strings efficiently. It’s part of the java.lang package and is available since Java 1.5.

Posted in Без рубрики | Comments Off on Java.Core.What is StringBuilder?

Java.Core.How does Java implement pass-by-value?

📦 What gets passed? Type What gets passed? Primitives (int, double, boolean, etc.) The actual value (a copy of the primitive itself) Objects (String, List, etc.) A copy of the reference to the object (not the object itself) 🔥 What … Continue reading →

Posted in Без рубрики | Comments Off on Java.Core.How does Java implement pass-by-value?

Java.Core.What is the difference between Comparator and Comparable?

🔗 Comparator vs Comparable Feature Comparable Comparator Interface location java.lang (core package) java.util (utility package) Purpose Defines natural ordering of a class Defines custom ordering for a class (outside the class itself) Where to implement? In the class itself (the … Continue reading →

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

Java.Core.Why abstract method in java without word abstract ?

This can be a bit confusing, so let me explain why abstract methods in interfaces (and sometimes in abstract classes) don’t always have the abstract keyword in modern Java. 🔎 Historical Context — Before Java 8 Before Java 8, if … Continue reading →

Posted in Без рубрики | Comments Off on Java.Core.Why abstract method in java without word abstract ?