Java Development
-
Get methods return type
This is an example of how to get the return type of a classe’s methods. To get the return type of…
Read More » -
Get Modifiers from an Object
In this example we shall show you how to get the modifiers of a class. To get the modifiers of a…
Read More » -
Invoke Method with reflection
With this example we are going to demonstrate how to invoke a method using reflection. In short, to invoke a…
Read More » -
Get Methods from an Object
This is an example of how to get methods of an Object. Getting the methods of an Object implies that…
Read More » -
Get Fields from an Object
In this example we shall show you how to get the fields of a class represented by an object. To…
Read More » -
Create Proxy object
With this example we are going to demonstrate how to create a Proxy object. A proxy is a class functioning…
Read More » -
Synchronization with multiple locks
The basic idea is to use separate locks to guard multiple independent state variables of a class, instead of having…
Read More » -
Synchronized method and block
The first level of synchronization is on method scope: public class HelloSync { private Map dictionary = new HashMap(); public…
Read More » -
Simple Do While loop Java Example
1. Introduction A do-while loop in Java is a control flow statement that executes a block of code at least once, and then repeatedly executes…
Read More » -
Sum Array of Numbers with for loop
This is an example of how to get the sum of the numbers in an array using a for loop. The…
Read More »