hhdbxdb77471 hhdbxdb77471
  • 04-03-2024
  • Computers and Technology
contestada

What will this method call output?

public int mysteryMethod(String x, char y)
{
int z = 1;
for(int i = 0; i < (); i++)
{
if(x.charAt(i) == y)
{
z++;
}
}
return z;
}

mysteryMethod(Karel The Dog, 'e');
a) 1
b) 3
c) 4
d) 5

Respuesta :

Otras preguntas

How does heating a metal allow you to identify it?
A strange new organism with large, complex eyes is found in the tropical rainforests of South America. The organism makes its nest in a different tree every yea
How do you solve 4x - 1/2=8 ?
use a compatible numbers to estimate the quotient for 469.4 divided by 62
Which of the following contains the majority of the mass in the solar system? A.Earth B.Jupiter C.the sun D.the moon
Historians have not been able to trace Hannibal's ___ over the Alps; the bones of the elephants that died on the route have not been found. A. aberration B. epi
an equation for this statement. Twelve birds are 3 more than twice the number of birds Rhonda saw yesterday.
how are mid ocean ridges formed
The product of 9 and a number is 12 less than three times that number. Can anyone explain what the problem is? I dont understand what its asking
Which word is a contraction? A. its B. it C. it'is D. it's