Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. public class Debug5
  2. {
  3. public static void main(String[] args)
  4. {
  5. String[] specialties = {"Cardiology", "Emergency", "Stroke", "Burn"};
  6.  
  7. for(int a = 0; a < specialties.length; a++) // removed ()
  8. {
  9. System.out.println(specialties[a]);
  10. System.out.println("The length is " + specialties[a].length()); // added ()
  11. }
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement