Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. //so if String str = "Compute", I should end up with
  2. C
  3. o
  4. m
  5. p
  6. u
  7. t
  8. e
  9.  
  10. public static void main(String[] args) {
  11. int x = 0;
  12.  
  13. String str = "Compile";
  14.  
  15. for (int z=0;z<str.length();z++) {
  16. char ans = str.charAt(x);
  17. String inn=" "+ans
  18. System.out.println(inn);
  19. x++;
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement