Java | Functions | Question 11

Last Updated :
Discuss
Comments
Predict the output of the following program. Java
class Test
{
    public static void main(String[] args)
    {
        String str = "geeks";
        str.toUpperCase();
        str += "forgeeks";
        String string = str.substring(2,13);
        string = string + str.charAt(4);;
        System.out.println(string);
    }
}
eksforgeekss
eksforgeeks
EKSforgeekss
EKSforgeeks
Share your thoughts in the comments