Java Development
-
Free Flowing Switch Statement
With this example we are going to demonstrate how to create a free flowing switch statement. A free flowing switch…
Read More » -
try/catch/finally InputStream example
This is an example of an InputStream in a try/catch/finally statement. Using try/catch/finally statement to create an InputStream implies that…
Read More » -
try with resource example
The NewResource code below: public class NewResource implements AutoCloseable{ String closingMessage; public NewResource(String closingMessage) { this.closingMessage = closingMessage; } public…
Read More » -
Java throw Exception Example
In this post, we feature a comprehensive Java throw Exception Example. 1. What is an Exception in Java? Exception is…
Read More » -
Create custom Exception example
This is an example of how to create and use a custom exception that will be thrown in a specified condition.…
Read More » -
Checked and Unchecked Exceptions example
In this example we shall show you how to use a checked and an unchecked exception. A checked exception is…
Read More » -
Java Generics Examples
1. Introduction Sun Microsystems included Java Generics in java 1.5 to introduce the type-safety feature while using the collection classes. It…
Read More » -
Static Variable Java Example
1. Introduction This is a static variable Java Example. Static variables are declared with the static word before the type…
Read More » -
short
In this example we shall show you how to use a short type in Java. The short data type is a…
Read More » -
long
With this example we are going to demonstrate how to use a long type in Java. The long data type…
Read More »