Question: How many A's and how many letters total will be printed when printSomething (ABCD) is called? public void print Something (String s) { int
How many A's and how many letters total will be printed when printSomething ("ABCD") is called? public void print Something (String s) { int if (n < 1) ns.length(); return; String s1 = s.substring (1, n); printSomething (sl); System.out.println (s); print Something (s1);
Step by Step Solution
3.46 Rating (153 Votes )
There are 3 Steps involved in it
public void printSomethingString s int n slength if n 1 return String s1 ssubstring1 n printSomethin... View full answer
Get step-by-step solutions from verified subject matter experts
