كتتمة للموضوع السابق تغيير نسبة شفافية النوافذ في النسخة السابعة من الجافا، هذه إضافة جديدة في النسخة السابعة.
Strings in switch
في النسخة الحالية، يمكن فقط استعمال char، byte، short و int في شرط الswitch. في النسخة السابعة يمكن استعمال String ايضا في switch
مثال
public class NewClass{
public static void main(String[] args) {
String whoIsThis = "zozo";
switch(whoIsThis) {
case "zozo":
System.out.println("Hi zozo, let's go to the café");
break;
case "zeze":
System.out.println("Go home zeze, it's late");
break;
case "zizi":
System.out.println("Hello zizi, you're shining today");
break;
default:
System.out.println("Who are you?");
break;
}
}
}ويمكن تحميل jdk7 early access من هذا الرابط http://download.java.net/jdk7/binaries

