Question: What is the output? public static void main(String[] args) { String str = first second; for(int i = str.length() / 4; i >=0; i--)
Transcribed image text
What is the output? public static void main(String[] args) { String str = "first second"; for(int i = str.length() / 4; i >=0; i--) { if (i == (str.length() - 1) / 4) break; System.out.print(str.charAt(i)); } } What is the output? public static void main(String[] args) { String str = "first second"; for(int i = str.length() / 4; i >=0; i--) { if (i == (str.length() - 1) / 4) break; System.out.print(str.charAt(i)); } }
Step by Step Solution
There are 3 Steps involved in it
tsr 1 String str first second Initializes a string variable str with the value first second 2 for in... View full answer
Get step-by-step solutions from verified subject matter experts
