Yearly Archives

Method Overloading with Autoboxing and Widening in Java

In Java there are two type of variables: Primitive type and Reference type. Conversion of primitive type to its...

Method Overloading with Autoboxing and Widening in Java

In Java there are two type of variables: Primitive type and Reference type. Conversion of primitive type to its...

Method overloading and null error in Java

In Java it is very common to overload methods. Below is an interesting Java program. public class Test {...

Method overloading and null error in Java

In Java it is very common to overload methods. Below is an interesting Java program. public class Test {...

Different ways of Method Overloading in Java

Java can distinguish the methods with different method signatures. i.e. the methods can have the same name but with...

Different ways of Method Overloading in Java

Java can distinguish the methods with different method signatures. i.e. the methods can have the same name but with...

Variable Arguments (Varargs) in Java

In JDK 5, Java has included a feature that simplifies the creation of methods that need to take a...

Variable Arguments (Varargs) in Java

In JDK 5, Java has included a feature that simplifies the creation of methods that need to take a...

Valid variants of main() in Java

We know that a Java code begins to execute from the main method. During runtime, if JVM can’t find...

Valid variants of main() in Java

We know that a Java code begins to execute from the main method. During runtime, if JVM can’t find...

Throwable fillInStackTrace() method in Java

The fillInStackTrace() method, of java.lang.Throwable class, records within this Throwable object information about the current state of the stack...

Throwable fillInStackTrace() method in Java

The fillInStackTrace() method, of java.lang.Throwable class, records within this Throwable object information about the current state of the stack...

Returning Multiple values in Java

Java doesn’t support multi-value returns. We can use following solutions to return multiple values. If all returned elements are...

Returning Multiple values in Java

Java doesn’t support multi-value returns. We can use following solutions to return multiple values. If all returned elements are...

How are parameters passed in Java?

See this for detailed description. In Java, parameters are always passed by value. For example, following program prints i...

How are parameters passed in Java?

See this for detailed description. In Java, parameters are always passed by value. For example, following program prints i...

Methods in Java

A method is a collection of statements that perform some specific task and return the result to the caller....

Methods in Java

A method is a collection of statements that perform some specific task and return the result to the caller....

strictfp keyword in java

strictfp is a keyword in java used for restricting floating-point calculations and ensuring same result on every platform while...

strictfp keyword in java

strictfp is a keyword in java used for restricting floating-point calculations and ensuring same result on every platform while...