Yearly Archives

System.exit() in Java

The java.lang.System.exit() method exits current program by terminating running Java virtual machine. This method takes a status code. A...

System.exit() in Java

The java.lang.System.exit() method exits current program by terminating running Java virtual machine. This method takes a status code. A...

Date after() method in Java

The java.util.Date.after() method is used to check whether the current instance of the date is after the specified date....

Date after() method in Java

The java.util.Date.after() method is used to check whether the current instance of the date is after the specified date....

Passing and Returning Objects in Java

Although Java is strictly pass by value, the precise effect differs between whether a primitive type or a reference...

Passing and Returning Objects in Java

Although Java is strictly pass by value, the precise effect differs between whether a primitive type or a reference...

Default Methods In Java 8

Before Java 8, interfaces could have only abstract methods. The implementation of these methods has to be provided in...

Default Methods In Java 8

Before Java 8, interfaces could have only abstract methods. The implementation of these methods has to be provided in...

Remote Method Invocation in Java

Remote Method Invocation (RMI) is an API which allows an object to invoke a method on an object that...

Remote Method Invocation in Java

Remote Method Invocation (RMI) is an API which allows an object to invoke a method on an object that...

Clone() method in Java

Object cloning refers to the creation of an exact copy of an object. It creates a new instance of...

Clone() method in Java

Object cloning refers to the creation of an exact copy of an object. It creates a new instance of...

Java is Strictly Pass by Value!

Consider the following Java program that passes a primitive type to function. public class Main { public static void...

Java is Strictly Pass by Value!

Consider the following Java program that passes a primitive type to function. public class Main { public static void...

Private and final methods in Java

When we use final specifier with a method, the method cannot be overridden in any of the inheriting classes....

Private and final methods in Java

When we use final specifier with a method, the method cannot be overridden in any of the inheriting classes....

Overloading main() in Java

Consider the below Java program. // A Java program with overloaded main() import java.io.*; public class Test { //...

Overloading main() in Java

Consider the below Java program. // A Java program with overloaded main() import java.io.*; public class Test { //...

Method Overloading and Ambiguity in Varargs in Java

Method Overloading in Varargs Overloading allows different methods to have same name, but different signatures where signature can differ...

Method Overloading and Ambiguity in Varargs in Java

Method Overloading in Varargs Overloading allows different methods to have same name, but different signatures where signature can differ...