msketchy msketchy
  • 17-12-2017
  • Computers and Technology
contestada

What is output by the following code?

String q = "adjective";
String r = "stinky";

System.out.println( q.charAt( r.indexOf ('t')));
1. 1
2. 2
3. Index out of bounds exception
4. a
5. d

Respuesta :

mhchen mhchen
  • 17-12-2017
r.indexOf('t') is 1
q.charAt(1) is d.

It will output 5. d
Answer Link

Otras preguntas

what is a rational number between 1/8 and 1/4?
What's the answer to 1\2x+3=9
King Louis XVIA.He admired the revolution's principles.B.He was suspicious of the leaders of the revolution.C.He felt it was a much better revolution than the A
if 4 bags of corn can feed a herd of cows for 6 days, how many bags will feed the herd for 9 days ?
what is a rational number between 1/8 and 1/4?
write the following ratio in simplest form : 32 min : 36 min A. 8 : 9 B. 8 : 36 C. 32 : 9 D. 128 : 144
what can turn igneous rock into sediment?
the pair of polygons is similar. find the value of x. answer on picture
who made dutch claims in north america?
what can turn igneous rock into sediment?