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
  • 47,128
  • 13
  • 114
  • 141
Dannyboy
  • 1,825
  • 3
  • 17
  • 33

0 Answers0