English, asked by chandankk260898, 6 hours ago

What will be the output of the program? String str = "welcome"; str.toUpperCase(); /* Line 2 */ String s1 = str.replace('C', 'c'); s1 = $1 + " to Java"; System.out.println(s1); Select one WELCOME to Java WELCOME to Java h O WELCOME TO JAVA welcome to Java

Answers

Answered by mghdhurve
0

Explanation:

Main class

class GFG {

// Main driver method

public static void main(String args [])

{

// Custom input string

String str = "Welcome to java";

// Converting above input string to

// uppercase letters using UpperCase() method

String strup = str.toUpperCase();

// Print the uppercased string

System.out.println(strup);

}

}

Output

WELCOME TO JAVA

Answered by aishabsit786
0

Answer:

WELCOME TO JAVA

Explanation:

print command will print as it is text which had mentioned in command

Similar questions