0

I'm seeing code like this at the beginning of a Java class.
This is clearly not a method. What does it do?

static {
    // Grab the source ordering and create a lookup table
    // e.g. x => 0, z => 1, a => 2...
    for (int i = 0; i < Constants.SOURCE_ORDER.length; i++) {
        sourceSortOrderMap.put(Constants.SOURCE_ORDER[i], i);
    }
}
Boann
  • 48,794
  • 16
  • 117
  • 146
Dannyboy
  • 1,963
  • 3
  • 20
  • 37

0 Answers0