Computer Science, asked by poojatagra662, 16 days ago

Predict the output for the following functions:
String st1 = "India";
String st2 = "Wins";
String st3 = 'World Cricket Cup 2019");
(i) System.out.println(st1+st2+st3);
(ii) System.out.println(st3.length());
(iii) System.out.println(st3.subString(14,22));
(iv) System.out.println(st3.charAt(0) + st3.charAt(6) + st3.charAt(14));
if u know then only answer my question pl don't spam​

Answers

Answered by BhumiChopra
1

Answer:

(i) IndiaWinsWorld Cricket Cup 2019

(ii) 22

(iii) Cup 201 (it may display out of bounds because st3 has 21 characters when we start counting from 0)

(iv) W C

Answered by rishabh994
0

Answer:

i) IndiaWins

third string will not be acceptable due to different quotation marks.If it's typing mistake then ,

the output will be

IndiaWinsWorld Cricket Cup 2019

ii) Error

or

22

iii)Again error

or Cup 201

iv) Error

or WCC

Okk so u r in 11th..

Then what is ur subject ?

Similar questions