System.out.println() and System.out.print() are only used method for output on console. But there is a class PrintStream a drived class of OutputStream having a implemented method write(), it can be used to write to the console. The simplest form of write() is :
void write (int byteValue)
The method writes to the stream in byte format by byte Value. The byte Value is declared as an integer but only low-order eight bits are written.
public static void main(String args)
x = 'A';
x= 'p' ;