X Tutup

Tagged: java tutorial

java multiple catch block 0

Java Multiple Catch Block

One or more catch blocks may come after a try block. Every catch block must have its exception handler. So, if you need to perform multiple tasks in response to different exceptions, use the...

can we start a thread twice in java 0

Can we start a Thread twice in Java

“Starting a thread twice” in the context of Java multithreading refers to the attempt to initiate the execution of a single thread more than once using the start() method. Java threads have a lifecycle...

java final finally and finalize 0

Java final, finally and finalize

Final, Finally, finalise is a separate concept in Java, each with a unique function within the language. Final is a keyword in Java. When applied, it turns a variable into a constant, meaning its...

java thread scheduler 0

Java Thread Scheduler

A Java component called a thread scheduler decides what threads to run or execute and where to wait. The thread scheduler in Java will select only threads that are in a runnable state. However,...

concurrent modification exception in java 0

ConcurrentModificationException in Java

When working with Java collections, you may come across a ConcurrentModificationException. This exception occurs when you try to modify a collection while iterating over it, leading to unexpected behaviour or errors. A ConcurrentModificationException is...

joining threads in java 0

Joining Threads in Java

The join() method of the Thread class enables one thread to wait until another thread has finished running. If t is a Thread object that is presently running, t.join() will ensure that t is...

Encapsulation in Java 0

Encapsulation in Java

In this article, we will explore the concept of encapsulation in the Java programming language. We will first discuss data hiding or abstraction, the need for encapsulation, and its advantages. We will examine various...

daemon thread in java 0

Daemon Thread in Java

A daemon is a special kind of thread in the Multithreaded Programming Environment that operates quietly and handles routine tasks that are not intrinsically significant to the program’s core function. Unlike regular threads, daemon threads...

X Tutup