Guest User

Untitled

a guest
Jan 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1.  
  2. import java.util.HashMap;
  3. import java.util.Map;
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. public class Mapping
  12. {
  13. Map<String, String> map = new HashMap<String, String>();
  14.  
  15.  
  16.  
  17. public Mapping()
  18. {
  19.  
  20. map.put("A", "001");
  21. map.put("B", "002");
  22. map.put("C", "003");
  23. map.put("D", "004");
  24. map.put("E", "005");
  25. map.put("F", "006");
  26. map.put("G", "007");
  27. map.put("H", "008");
  28. map.put("I", "009");
  29. map.put("J", "010");
  30. map.put("K", "011");
  31. map.put("L", "012");
  32. map.put("M", "013");
  33. map.put("N", "014");
  34. map.put("O", "015");
  35. map.put("P", "016");
  36. map.put("Q", "017");
  37. map.put("R", "018");
  38. map.put("S", "019");
  39. map.put("T", "020");
  40. map.put("U", "021");
  41. map.put("V", "022");
  42. map.put("W", "023");
  43. map.put("X", "024");
  44. map.put("Y", "025");
  45. map.put("Z", "026");
  46.  
  47. }
  48.  
  49. public int buchstabeInZahl(String buchstabe)
  50. {
  51. String iStr = map.get(buchstabe);
  52. int i = Integer.parseInt(iStr);
  53. System.out.println(i);
  54. return i;
  55. }
  56.  
  57.  
  58. }
Add Comment
Please, Sign In to add comment