1.

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())));

Answer»

The output is as follows: 

greinds 

WHEAT



Discussion

No Comment Found

Related InterviewSolutions