Computer Science, asked by swayamporwal, 5 months ago

State the output of the following program segment:

String str1 = "great"; String str2 = "minds";
System.out.println(str1.substring(0, 2).concat(str2.substring(1)));
System.out.println(("WH" + (str1.substring(2).toUpperCase())));

Answers

Answered by debasish2cse
0

Answer:

grinds

WHEAT

Explanation:

when two value is given

first one is starting index which is included

second one is end index which is excluded

Similar questions
Math, 2 months ago