Java PrintStream Class

The PrintStream class provides methods to write data to another stream. The PrintStream class automatically flushes the data so there is no need to call flush() method. Moreover, its methods don't throw IOException.

Class declaration

public class PrintStream extends FilterOutputStream implements Closeable. Appendable

Java CharArrayReader class methods

  1. void print(boolean b)

    It prints the specified boolean value.

  2. void print(char c)

    It prints the specified char value.

  3. void print(char[] c)

    It prints the specified character array values.

  4. void print(int i)

    It prints the specified int value.

  5. void print(long l)

    It prints the specified long value.

  6. void print(float f)

    It prints the specified float value.

  7. void print(double d)

    It prints the specified double value.

  8. void print(String s)

    It prints the specified string value.

  9. void print(Object obj)

    It prints the specified object value.

  10. void println(boolean b)

    It prints the specified boolean value and terminates the line.

  11. void println(char c)

    It prints the specified char value and terminates the line.

  12. void println(char[] c)

    It prints the specified character array values and terminates the line.

  13. void println(int i)

    It prints the specified int value and terminates the line.

  14. void println(long l)

    It prints the specified long value and terminates the line.

  15. void println(float f)

    It prints the specified float value and terminates the line.

  16. void println(double d)

    It prints the specified double value and terminates the line.

  17. void println(String s)

    void println(String s)


Example :

Flash Soon


Output:



Advertisement

© Sapster 2017