Search Results for: java 8
-
class
IdentityHashcode example
With this example we are going to demonstrate how to get the identity hashcode of a File. Each class in…
Read More » -
class
Comparing File objects using hashcode example
This is an example of how to compare File objects using the hashcode. Each class in Java inherits hashCode() method…
Read More » -
class
Final class fields example
This is an example of how to use final fields in a class, so as to understand the difference between…
Read More » -
class
Conflicting Constructors
With this example we are going to demonstrate how to use conflicting constructors in a class. In short, to use…
Read More » -
class
Avoid side-effects with Object.clone
In this example we shall show you how to avoid side-effects when using Object.clone. To avoid side-effects when using Object.clone we…
Read More » -
class
Implementing Cloneable interface
In this example we shall show you how to implement the Cloneable interface. A class implements the Cloneable interface to…
Read More » -
class
A wrapper class
This is an example of how to create a wrapper class. A wrapper class is defined as a class in…
Read More » -
class
Immutable object example
With this example we are going to demonstrate how to create and use an immutable object. Immutable objects are objects…
Read More » -
class
Class casting example
With this example we are going to demonstrate how to cast an object of a class to another class. In…
Read More » -
class
Abstract class example
With this example we are going to demonstrate how to create and use an abstract class. In short, we have…
Read More »