Is it possible to access two synchronized methods of a class at the same time – Suppose a class (say class Book) has two ‘synchronized’ methods, then is it possible to access each of these […]
Latest Posts Under: Core Java
Core Java
What is Lock in java Thread and types of Lock – java.util.concurrent.locks.Lock Lock in multiple threading provide more extensive locking operations than the internal lock used by synchronized methods and blocks. A lock is a […]
Thread Scheduler The thread scheduler is one of the part of JVM (mostly JVM takes help of native threads on the underlying OS) and that decides which thread should run at any point of time, […]
Create custom unchecked exception in Java – You can create custom unchecked exception when you want to propagate certain exception handling responsibility to the caller method rather than handling it in place where exception is […]
What is NullPointerException(NPE) ? NullPointerException is a RuntimeException. In Java, a special null can be assigned to an object reference. NullPointerException is thrown when an application attempts to use an object reference, having the null […]
How String Pool is implemented and how to configure: I think as a Java Professional, you know what is String pool. But do you know the limit of String pool, how to configure the limit […]
Concurrent Collections in java: The java.util.concurrent package includes some classes and interfaces related to the Java Collections Framework. Below are the concurrent collection interfaces – BlockingQueue defines a first-in-first-out data structure that blocks or times […]
How to Create Java Custom Exception – Java Example Program We can create our own exceptions by extending ‘Exception’ class. Below example will show you how to create custom exception by extending Exception class. In […]
How HashMap works in JAVA HashMap permits null values and the null key. The HashMap class is equivalent to Hashtable, except that it is unsynchronized and permits nulls. This class makes no guarantees as to […]
Advantages: Static members/methods are used as in helper classes say like Math or in constants classes. which helps other objects to utilize Strings or useful functions for which you do not need to create object […]