Wrox Programmer Forums
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 18th, 2003, 07:55 PM
Registered User
Join Date: Jul 2003
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?

Old July 19th, 2003, 12:29 AM
Authorized User
Join Date: May 2003
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

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

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