Priya,
The java.io.Writer.write(String str) method writes a string.
If an I/O error occurs, take characters instead of numbers and call write() method.
int[] arr = new int[2];
arr[0] = 'S';
arr[1] = 'I';
System.out.write(arr[0]);
System.out.write(arr[1]);
Check this out.
Sep 25, 2017