Great non-obvious java tricks
- by folone
Consider having a class:
public class Test
{
public static void main(String [] args)
{
for (int i = 0; i < args.length; i++)
{
System.out.println(args[i]);
}
}
}
What happens if you run it: java Test *?
Answer: it prints out all the filenames in current directory.
Got more such tricks?