Eclipse3.1m2 part supports JDK5 syntax

xiaoxiao2021-03-06  73

Today, the Eclipse has been found from the original 3.0-> 3.1, and there are many variations. In my opinion, the most important thing is to support some of the syntax support for JDK5.

Enhanced for loop: Test code -> string [] strs = {"11", "22"}; for (String name: strs) {system.out.println (name);} ENUMERATED TYPES: Test Code -> Public Enum Stoplight {Red, Amber, Green}; for (Stoplight Light: stoplight.values ​​()) {system.out.println (Light);} static import: Feeling is not particularly large-> import static java.awt.BorderLayout. * getContentPane (). Add (new jPanel (), center; formatted output / varargs: Formatted Output -> System.out.printf ("% s / n", "kkkkkk");

Unfortunately, the new features of JDK5 should be all supported when Eclipse 3.1 is officially supported.

转载请注明原文地址:https://www.9cbs.com/read-92356.html

New Post(0)