There are many methods in PrintStream class. Let's see commonly used methods of PrintStream class:
- public void print(boolean b): it prints the specified boolean value.
- public void print(char c): it prints the specified char value.
- public void print(char[] c): it prints the specified character array values.
- public void print(int i): it prints the specified int value.
- public void print(long l): it prints the specified long value.
- public void print(float f): it prints the specified float value.
- public void print(double d): it prints the specified double value.
- public void print(String s): it prints the specified string value.
- public void print(Object obj): it prints the specified object value.
- public void println(boolean b): it prints the specified boolean value and terminates the line.
- public void println(char c): it prints the specified char value and terminates the line.
- public void println(char[] c): it prints the specified character array values and terminates the line.
- public void println(int i): it prints the specified int value and terminates the line.
- public void println(long l): it prints the specified long value and terminates the line.
- public void println(float f): it prints the specified float value and terminates the line.
- public void println(double d): it prints the specified double value and terminates the line.
- public void println(String s): it prints the specified string value and terminates the line./li>
- public void println(Object obj): it prints the specified object value and terminates the line.
- public void println(): it terminates the line only.
- public void printf(Object format, Object... args): it writes the formatted string to the current stream.
- public void printf(Locale l, Object format, Object... args): it writes the formatted string to the current stream.
- public void format(Object format, Object... args): it writes the formatted string to the current stream using specified format.
- public void format(Locale l, Object format, Object... args): it writes the formatted string to the current stream using specified format.
|
No comments:
Post a Comment