Solved programming problem

Basic Use of Buffered Reader in Java.

Source code

package inputoutput;

import java.io.BufferedReader;

import java.io.IOException;

import java.io.InputStreamReader;

public class InputOutput

{

 

    public static void main(String args[]) throws Exception

    {

        BufferedReader  reader; ///create varibale

        String line;

        reader = new BufferedReader(new InputStreamReader(System.in)); ///input file

       

        do{

            line = reader.readLine(); ///input

            line = line.toUpperCase();///make it uppercase

            System.out.println(line);

        }while(!"quite".equals(line));

       

    }

}

Output

code to haven

CODE TO HAVEN

Join the discussion

Add your comment