toLowerCase(char) method?

前端 未结 8 1546
醉酒成梦
醉酒成梦 2021-02-14 17:19

Apparently there is a method that takes a char and returns a char: http://download.oracle.com/javase/6/docs/api/java/lang/Character.html#toLowerCase(char)

But I can\'t s

相关标签:
8条回答
  • 2021-02-14 17:39
    import java.lang.Character;
    
    public class Test {  
        public static void main(String[] args) {  
            char c = 'A';  
            char lc = Character.toLowerCase(c);  
            System.out.println(lc);  
        }  
    }  
    
    0 讨论(0)
  • 2021-02-14 17:46

    toLowerCase() is a method of java.lang.String; you use it like so:

    
    jcomeau@intrepid:/tmp$ cat test.java; java test
    public class test {
     public static void main(String[] args) {
      System.out.println("C".toLowerCase());
     }
    }
    c
    
    0 讨论(0)
提交回复
热议问题