The Artima Developer Community
Sponsored Link

Java Answers Forum
char problem

2 replies on 1 page. Most recent reply: Sep 17, 2003 7:51 AM by gratiartis

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
shon

Posts: 42
Nickname: shon
Registered: Apr, 2003

char problem Posted: Sep 17, 2003 7:17 AM
Reply to this message Reply
Advertisement
how to increased the value of char?
for ex :
char a='a';

'a' to 'b'?
Thanks for answering


gratiartis

Posts: 8
Nickname: gratiartis
Registered: Sep, 2003

Re: char problem Posted: Sep 17, 2003 7:43 AM
Reply to this message Reply
You can always just do a++ ...

... but note that incrementing 'z' will give you '{'.

gratiartis

Posts: 8
Nickname: gratiartis
Registered: Sep, 2003

Re: char problem Posted: Sep 17, 2003 7:51 AM
Reply to this message Reply
btw ... The Character class acts as a wrapper around char and has a number of useful methods that can be helpful if you are doing a lot of manipulation of chars. Take a look at the API documentation to find out more:

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Character.html

Flat View: This topic has 2 replies on 1 page
Topic: ResultSet going out of scope Previous Topic   Next Topic Topic: Java Applet

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use