Advertisement
Guest User

Untitled

a guest
Jan 29th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. Parsing
  2. In your example, calling Integer.parseInt on a string is parsing this string to find an integer.
  3.  
  4. So, if you have:
  5.  
  6. String someString = "123";
  7. And then you invoke:
  8.  
  9. int i = Integer.parseInt( someString );
  10. You're telling java to analyze the "123" string and find an integer there.
  11.  
  12. Arrays:
  13.  
  14. String[] suit = { "Clubs", "Diamonds", "Hearts", "Spades" };
  15. String[] rank = { "2", "3", "4", "5", "6", "7", "8", "9", "10",
  16. "Jack", "Queen", "King", "Ace"
  17. }
  18.  
  19. // declares an array of integers
  20. int[] anArray;
  21.  
  22. // allocates memory for 10 integers
  23. anArray = new int[10];
  24.  
  25. 2D ARRAY
  26. double[][] a = new double[M][N];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement