Read char by char

Report a typo

Construct the program that reads and prints input data char by char.

Use < and > to adjust a code tabulation. Set a single tab for the loop body.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                current = reader.read();
              
                System.out.print((char) current);
              
                }
              
                int current = reader.read();
              
                Reader reader = new FileReader("file.txt");
              
                while (current != -1) {
              
                reader.close();
              
___

Create a free account to access the full topic