Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Other Java > Java Databases
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Java Databases Discussion specific to working with Java Databases. For other Java topics, please see related Java forums. For database discussions not specific to Java, please see the Database category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 18th, 2003, 07:55 PM
Registered User
Join Date: Jul 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default char problem

good day,

  I have a problem with this code

import java.lang.Character;
public class CharTest
    public static void main(String args[])
        char c1='s';
        char c2='S';
        char c3=' ';
        c3 = toUpperCase(c1);
        System.out.println("c1 "+c3);

all i wanted to do is to convert c1 to upper case, how can i do it?

  #2 (permalink)  
Old July 19th, 2003, 12:29 AM
Authorized User
Join Date: May 2003
Location: New Delhi, Delhi, India.
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts

Following changes u have to do in your code to convert c1 to uppercase.
c3 = Character.toUpperCase(c1);
toUpperCase is a method of caharcter class and to call a method in java you have specify which class method you are calling so u have to write Character.toUpperCase(char).


Yashraj Chauhan
Java\J2EE Specialist
Wiley Support Team

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Big challenge here! How to convert char* to char^? samiswt Visual C++ 2005 1 November 30th, 2007 09:09 PM
Invalid conversion from 'char*' to 'char' deuxmio C++ Programming 3 December 8th, 2006 07:56 AM
Escape char for '-' mattastic Access 1 October 6th, 2005 03:27 PM
getting the last CHAR of a string kondapally Crystal Reports 0 December 13th, 2004 03:39 PM
Want to reiterate on my char to int problem CNewbie C++ Programming 0 April 2nd, 2004 12:47 AM

All times are GMT -4. The time now is 02:51 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.