I looked at some Java code today, and I found some weird syntax:
public class Sample {
public int get()[] {
return new int[]{1, 2, 3};
}
}
I thought that can't compile and wanted to fix what I thought was a typo, but then I remembered the Java compiler did actually accept it!
Can someone please help me understand what it means? Is it an array of functions?