Easy learning with example program codes

Java 7 Type Inference

Java 7 introduced a new feature Type Interface which provides ability to compiler to infer the type of generic instance. We can replace the type arguments with … Read More

java 7 catch multiple exceptions

Java 7 provides the facility to catch multiple type exceptions in a single catch block to optimize code. We can use vertical bar or pipe (|) to … Read More

Java 7 Numeric Literals with Underscore

Numeric Literals

Java 7 provides the facility to use underscore in numeric literals like int, byte, short, float, long, double. We can use any number of underscore … Read More

java 7 binary literals example

Binary Literals

In Java 7, the integral types (byte, short, int, and long) can also be expressed using the binary number system. To specify a binary literal, … Read More

java 7 try with resources example


A resource is an object that must be closed after the program is finished with it. For example a File resource or JDBC resource for database … Read More

java varargs variable arguments example

Java varargs provides the facility to a method to accept variable number of arguments. Varargs refers to variable-length arguments. A variable-length argument is specified by three dots … Read More

Copyright © 2019 CodesJava Protection Status SiteMap Reference: Java Wiki