Question: In Java: What will the following code display? */ public static void main(String[] args){ String size = this is my size!, str = *-*-|; for(int
In Java: What will the following code display? */ public static void main(String[] args){ String size = "this is my size!", str = "*-*-|"; for(int index = 0; index < size.length(); index++){ System.out.print(str); if(index == size.length() - 1){ System.out.print(str.replace("|", "")); } } } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
