Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Paul Clapham
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Liutauras Vilda
Saloon Keepers:
Tim Holloway
Carey Brown
Roland Mueller
Piet Souris
Bartenders:
Forum:
Programmer Certification (OCPJP)
Regarding 'char'
Anish Nagraj
Greenhorn
Posts: 20
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
what would b printed in the console when printing using System.ou.println();
char c = \u0033;
System.ou.println(c);
char c = 65535;
System.ou.println(c);
char c = 0xffff;
System.out.println(c);
char c = 889;
System.ou.println(c);
what wil b the output of each one.
plz help me on this... bcoz what ever the first c i get '.' and if i print the other three i get '?'
Tamara Lopez
Ranch Hand
Posts: 63
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Try putting the unicode value in ''. It will print "3"
About the rest, anything over 127 cannot be resolved because there is no character assigned to it(I think), so println will print "?".
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Enthuware Acronyms
Typecasting between char and byte
does += (in general - all shorthand operators) imply an implicit cast?
help me
why is char doing strange things?
More...