Java – Naming Conventions

Last Updated:

Java naming conventions are sort of guidelines that application programmers are expected to follow to produce a consistent and readable code throughout the application. If …

Difference between this and super in Java

Last Updated:

this and super are reserved keywords in Java. this refer to current instance of a class while super refer to the parent class of that class where super keyword is used.

strictfp modifier in Java

Last Updated:

Java strictfp modifier ensures that all floating-point operations across different JVMs will provide consistent and same result as predicted by IEEE 754.

Difference between final, finally and finalize in Java

Last Updated:

In this Java tutorial, learn about difference between final, finally and finalize in detail. In short, final is a keyword, finally is a block and finalize is a method. They have their own very specific purpose in Java programs.

Java extends vs implements keywords

Last Updated:

In Java, extends is used for extending a class and implements is used for implementing the interfaces. It’s the main difference between extends vs implements. …

Java instanceof operator

Last Updated:

Java instanceof operator (also called type comparison operator) is used to test whether the object is an instance of the specified type (class or subclass …

Java throw and throws keywords

Last Updated:

In Java exception handling, throw keyword is used to explicitly throw an exception from a method or constructor. And throws keyword is used declare the …

Java synchronized keyword

Last Updated:

Java synchronized keyword marks a block or method a critical section. A critical section is where one and only one thread is executing at any given time.

Java try catch finally blocks

Last Updated:

Java try catch finally blocks helps in writing the application code which may throw exceptions in runtime and gives us chance to recover from the exception.

Java boolean keyword

Last Updated:

Java boolean keyword is used to declare a variable as a boolean type which represents only one of two possible values i.e. either true or false.

Java assert keyword – assertion in Java

Last Updated:

Java assert keyword is used to create assertions in Java, which enables us to test the assumptions about our program. For example, an assertion may …

Java Flow Control Statements

Last Updated:

Java application code is normally executed sequentially from top to bottom in the order that the code appears. To apply business logic, we may need …

Java CopyOnWriteArraySet class

Last Updated:

Java CopyOnWriteArraySet example. This class is a thread-safe variant of HashSet which uses a underlying CopyOnWriteArrayList for all of its operations.

Java CopyOnWriteArrayList class

Last Updated:

Java CopyOnWriteArrayList is a thread-safe variant of ArrayList in which all mutative operations (add, set, and so on) are implemented by making a fresh copy …

Java TransferQueue – Java LinkedTransferQueue class

Last Updated:

Java TransferQueue is a concurrent blocking queue implementation in which producers may wait for receipt of messages by consumers. LinkedTransferQueue class is an implementation of …

Java ArrayBlockingQueue class

Last Updated:

ArrayBlockingQueue class is Java concurrent and bounded blocking queue implementation backed by an array. It orders elements FIFO (first-in-first-out). The head of the ArrayBlockingQueue is …

Java PriorityBlockingQueue class

Last Updated:

Java PriorityBlockingQueue class is concurrent blocking queue data structure implementation in which objects are processed based on their priority. The “blocking” part of the name is added to imply the thread will block waiting until there’s an item available on the queue.

Java PriorityQueue

Last Updated:

Java PriorityQueue example. PriorityQueue class is a queue data structure implementation in which objects are processed based on their priority.

Java Spliterator interface

Last Updated:

Java Spliterator interface is an internal iterator that breaks the stream into the smaller parts. These smaller parts can be processed in parallel. In real …

HowToDoInJava

A blog about Java and its related technologies, the best practices, algorithms, interview questions, scripting languages, and Python.