Menu
Topics Index
...
`

Java Comes2117


If you need explanation Read this topic

If you need Answer Take test on this topic

Java Comes2117
What will be the output of the following program?
public class JavaComes {
    public static void main(String[] args) {
        String input = "Will java comes?";
        String input1 = input.substring(0, 3);
        System.out.println(input);
        input = input.replace('i', 'e');
        input = input.replace("?", "");
        input1.replace('i', 'e');
        input1 = input1.replace('i', 'e') + input.substring(10, 14) + " to " + input.substring(5, 10) + " School";
        System.out.println(input1 = input);
    }
}

A. Will java comes? 
Welcome to java School
B. Well java comes 
Welcome to java School
C. Will java comes?
Well java comes
Welcome to java  School
D. Will java comes? 
Will java comes?
E. Some other output
F. Compilation Error or Runtime Error
Topic: replace() Method In Java

If you need explanation Read this topic

If you need Answer Take test on this topic

User comments below. All of them might not be correct.

E is ans.such as will java comes? well java comes ... input is prntd with its orignal content and i init is replaced with e again the content of inpt1 is prnt

Posted by Shabaaz Shaikz    2014-07-31 12:39:28


Ans is E output is will java comes?
well java comes

Posted by Bharath Yelchuri    2014-07-31 12:45:03


Congratulations Shabaaz Shaikz. You are this dose winner. We will send you the link using which you can claim your recharge.

Posted by Merit Campus    2014-08-01 05:15:54


© meritcampus 2019

All Rights Reserved.

Open In App