max) { finalSSID = result.SSID; max = result.level; } } System.out.println(result + "\n"); } //code used now for the same val network=Grid.wifiScanList.maxBy(_._1.level)`" />