Question: What is the output? public static void main(String[] args) { String str = first second; for (int i str.length() / 4; i >=0; i--)

What is the output? public static void main(String[] args) { String str =

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

1 Expert Approved Answer
Step: 1 Unlock

Theres a logical error in your code The assignment operator is used ins... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!