Question: Consider the code block below. What is printed as a result of newString(coding)? public static void newString(String word) { String newStr = ; for (int
Consider the code block below. What is printed as a result of newString("coding")? public static void newString(String word) { String newStr = "";
for (int x = 0; x < word.length(); x+=2) {
newStr += word.substring(x); }
System.out.println(newStr); }
Step by Step Solution
3.52 Rating (149 Votes )
There are 3 Steps involved in it
public static void newStringString word String newStr for int x 0 x wordlength x 2 newStr wordsubstr... View full answer
Get step-by-step solutions from verified subject matter experts
