Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2015
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. package prjshrdcjf;
  2.  
  3. public class Purchasing {
  4.  
  5. public Purchasing(){
  6. String[][] items = new String[7][3];
  7. items[0][0] = "1";
  8. items[0][1] = "Mouse";
  9. items[0][2] = "30.00";
  10.  
  11. items[1][0] = "2";
  12. items[1][1] = "KeyBoard";
  13. items[1][2] = "22.00";
  14.  
  15. items[2][0] = "3";
  16. items[2][1] = "USB Drive";
  17. items[2][2] = "45.99";
  18.  
  19. items[3][0] = "4";
  20. items[3][1] = "Screen";
  21. items[3][2] = "100.00";
  22.  
  23. items[4][0] = "5";
  24. items[4][1] = "Power Cord";
  25. items[4][2] = "15.99";
  26.  
  27. items[5][0] = "6";
  28. items[5][1] = "Cable";
  29. items[5][2] = "10.90";
  30.  
  31. items[6][0] = "7";
  32. items[6][1] = "USB Cable";
  33. items[6][2] = "11.90";
  34. System.out.println("\t ----------------------------------------");
  35. for(int row=0; row<=items.length -1; row++){
  36. for(int col=0; col<=2; col++){
  37. System.out.print("\t | " + items[row][col] + " ");
  38. }
  39. System.out.println("\t|\n\t ----------------------------------------");
  40.  
  41. }
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement