public class Peshev { public static void main(String... args) { String[] fff = new String[]{"a", "b",}; System.out.println(fff[0]+fff[1]); } } |
Do you see the trailing comma after "b"? That's allowed. Unexpected from a strongly-typed lang as Java.
Surrender your ego
public class Peshev { public static void main(String... args) { String[] fff = new String[]{"a", "b",}; System.out.println(fff[0]+fff[1]); } } |
Do you see the trailing comma after "b"? That's allowed. Unexpected from a strongly-typed lang as Java.
Seems so 🙂
http://hanuska.blogspot.com.es/2007/02/trailing-comma-in-arrays.html
It is convenient, safe, syntactic sugar. What's the problem
it's not a problem, I just discovered it. It is an interesting feature.