Forum : I/O STREAMS
Brief description  about Online courses   join in Online courses
View Santosh Kumar Mohanty 's Profile

I/O STREAMS

class WriteExample {
public static void main(String args[]) {
int w;
w = 'S';
System.out.write(w);
System.out.write('n');
}
}
Sir, in the above example w is of integer type and we are assigning a value of char type how is it possible i am confused a bit please help me out of this problem
THANKS
Asked by Santosh Kumar Mohanty | Dec 9, 2010 |  Reply now
Replies (2)
View santosh kumar mohanty 's Profile
Thanks sir
I Got It
sir, i am a trainee of ur organisation
i want to know what will be the topics that is going to
come in my final screening round

Thanks A Lot
Dec 15, 2010
View arun kumar das 's Profile
HI

you are using int type variable and initializing it with character than it will display the ASCII value of that character.

java teacher
Dec 13, 2010