Page 1 of 1

What will be the output of the following Java program if input given is “abc’def/’egh”?

Posted: Wed Jul 13, 2022 7:50 pm
by answerhappygod
class Input_Output { public static void main(String args[]) throws IOException { char c; BufferedReader obj = new BufferedReader(new InputStreamReader(System.in)); do { c = (char) obj.read(); System.out.print(c); } while(c!='\''); } }
a) abc’
b) abcdef/’
c) abc’def/’egh
d) abcqfghq