p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Java Databases (http://p2p.wrox.com/forumdisplay.php?f=114)
-   -   char problem (http://p2p.wrox.com/showthread.php?t=1836)

roelbagao July 18th, 2003 07:55 PM

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?

Yashraj Chauhan July 19th, 2003 12:29 AM

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

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

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