Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Imagine having a String-Array arr[] which is filled with random strings. We wanna print out each String in the array
- //for-Loop
- for(int i=0; i < arr.length; i++){
- System.out.println(arr[i]);
- }
- //enhanced for-loop
- for (String s : arr) {
- System.out.println(s);
- }
Advertisement
Add Comment
Please, Sign In to add comment