Java 1.7

Páginas: 4 (757 palabras) Publicado: 10 de abril de 2012
List Java 1.7 Features 
Oracle’s Java 1.7 is currently in progress. Java 1.7 / Java SE 7 are expected to contain many enhancements and new features when compared to Java 1.6 and Java 1.5. Anoverview on enhancements of Java 1.7 is:
JDBC in Java 1.7
JDBC contained in Java 1.7 / Java SE 7 is JDBC 4.1 that is newly getting introduced. JDBC 4.1 is more efficient when compared to JDBC 4.0.Language Enhancements in JDBC 1.7
Java 1.7 introduces many language enhancements:
Integral Types as Binary Literals – In Java 1.7 / Java SE 7, the integral types namely byte, short, int and long can alsobe expressed with the binary number system. To specify these integral types as binary literals, add the prefix 0B or 0b to number. For example, here is a byte literal represented as 8-bit binarynumber:
 
byte sampleByte = (byte)0b01001101;
Underscores Between Digits in Numeric Literal – In Java 1.7 and all later versions, “_” can be used in-between digits in any numeric literal. “_” can beused to group the digits similar to what “,” does when a bigger number is specified. But “_” can be specified only between digits and not in the beginning or end of the number. Example:
 
long SSN =819_44_9789L;
String Object as Expression in Switch Statement – So far only integral types are used as expressions in switch statement. But Java 1.7 permits usage of String object as a validexpression. Example:
 
public void sampleMethod(String sampleString)
{
            switch (sampleString)
            {
                       case "ONE":
                                   System.out.println(“Entered ONE”);
                                    break;
                    case "TWO":
                                    System.out.println(“Entered TWO”);
                                   break;
                    case "THREE":
                                    System.out.println(“Entered THREE”);
                                    break;
                   ...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Java
  • java
  • java
  • Java
  • Java
  • Java
  • Java
  • Java

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS