PrintStream.print
Class Overview | Class Members | This Package | All Packages
Syntax 1
public void print( boolean b )
Parameters
- b
The boolean to be printed
Description
Print a boolean value. If the given value is true, then the string "true" is written to the underlying output stream; otherwise, the string "false" is written.
Syntax 2
public void print( char c )
Parameters
- c
The char to be printed
Description
Print a character. The character is translated into one or more bytes according to the platform's default character encoding.
Syntax 3
public void print( int i )
Parameters
- i
The int to be printed
Description
Print an integer. The string printed is the same as that returned by the toString method of the Integer class when invoked on the given int value.
See Also
Syntax 4
public void print( long l )
Parameters
- l
The long to be printed
Description
Print a long integer. The string printed is the same as that returned by the toString method of the Long class when invoked on the given long value.
See Also
Syntax 5
public void print( float f )
Parameters
- f
The float to be printed
Description
Print a floating-point number. The string printed is the same as that returned by the toString method of the Float class when invoked on the given float value.
See Also
Syntax 6
public void print( double d )
Parameters
- d
The double to be printed
Description
Print a double-precision floating-point number. The string printed is the same as that returned by the toString method of the Double class when invoked on the given double value.
See Also
Syntax 7
public void print( char s[] )
Parameters
- s
The array of chars to be printed
Description
Print an array of characters. The characters are converted into bytes according to the platform's default character encoding.
Syntax 8
public void print( String s )
Parameters
- s
The String to be printed
Description
Print a string. If the argument is null, the string "null" is written to the underlying output stream. Otherwise, the string's characters are converted into bytes according to the platform's default character encoding.
Syntax 9
public void print( Object obj )
Parameters
- obj
The Object to be printed
Description
Print an object. The string printed is the same as that returned by the given object's toString method.