Following is my code:
class program{
public static void main(String[]args){
String str = new String("I like Java ");
str.concat("the most");
str.toUpperCase();
str.replace("LIKE","LOVE");
System.out.println(str);
}
}
As I expect the output should be as:
I LOVE JAVA THE MOST
But, It isn't showing an error but also not showing the expected output...Instead it is only showing the original string:
Am I missing something or may be is it something else?