Examveda
Examveda

What will be the output of the following Java program if input given is "Hello stop World"?
class Input_Output 
{
    public static void main(String args[]) throws IOException
    {	 
        string str;
        BufferedReader obj = new BufferedReader(new InputStreamReader(System.in));
        do
        {
            str = (char) obj.readLine();
      System.out.print(str);
        } while(!str.equals("strong"));
    }
}

A. Hello

B. Hello stop

C. World

D. Hello stop World

Answer: Option D


This Question Belongs to Java Program >> Input Output

Join The Discussion

Related Questions on Input Output