public class ClosestPair{ public static void main(String[] args) { float[][] a = new float[][]{{3, 3}, {1, 5}, {4, 6}, {2, 8}, {9, 9},{2, 1}, {7, 2}, {6, 5}, {9, 4}, {5, 9}}; float d = (float) 1e9; for(int i=0; i<10; i++){ for(int j=i+1; j<10; j++){…