jQuery in Action, 3rd edition
The moose likes Beginning Java and the fly likes char problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "char problem" Watch "char problem" New topic

char problem

Kunal Choudhary

Joined: Feb 25, 2009
Posts: 14
public class testoperator

public static void main(String args[])

char x='51';



why error???
Vikas Kapoor
Ranch Hand

Joined: Aug 16, 2007
Posts: 1374

I think you are trying to achieve ,
char x=51; // This is equivalent to 3 (ASCII)

'51' can't fit into single character.
I agree. Here's the link: http://aspose.com/file-tools
subject: char problem
It's not a secret anymore!