fork download
  1. import java.lang.*;
  2. import java.util.*;
  3.  
  4.  
  5. class Main
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. Map<Integer,Integer> nmResultMap = new LinkedHashMap<Integer,Integer>();
  10. nmResultMap.put(1,10);
  11. nmResultMap.put(2,20);
  12. nmResultMap.put(3,30);
  13. nmResultMap.put(4,40);
  14. nmResultMap.put(5,50);
  15.  
  16. float[][] results = new float[nmResultMap.size()][nmResultMap.size()];
  17.  
  18. for (Map.Entry<Integer,Integer> e :nmResultMap.entrySet()){
  19. for (Map.Entry<Integer,Integer> t :nmResultMap.entrySet()){
  20. //results[e.getValue()][t.getValue()] = doSomthng(e.getKey(),t.getKey());
  21. System.out.println("[" + e.getValue() + "][" + t.getValue() + "]");
  22. }
  23. }
  24. }
  25. }
Success #stdin #stdout 0.03s 245632KB
stdin
Standard input is empty
stdout
[10][10]
[10][20]
[10][30]
[10][40]
[10][50]
[20][10]
[20][20]
[20][30]
[20][40]
[20][50]
[30][10]
[30][20]
[30][30]
[30][40]
[30][50]
[40][10]
[40][20]
[40][30]
[40][40]
[40][50]
[50][10]
[50][20]
[50][30]
[50][40]
[50][50]