5.What is returned by the call go(30)?
public static String go ( int x)
{
String s = "";
for (int n = x; n > 0; n = n - 5)
S = S + x +
return s;}

Respuesta :

Answer:

The string returned is: 303030303030

Explanation:

Given

The above method

Required

The returned string

The method returns a string that is repeated x/5 times.

Take for instance;

x = 30

The method will return a string that contains x in 30/5 (i.e. 6) times

Hence, the result of go(30) is 303030303030