How to convert a string to lowercase in Java

1 Answer

0 votes
package javaapplication1;

public class JavaApplication1 {

    public static void main(String[] args) {

        String s = "JAVA C# C++";

        s = s.toLowerCase();

        System.out.println(s);

        System.out.println("ABC".toLowerCase());
    }
}


/*

run:
                   
java c# c++
abc
 
*/

 



answered Jan 11, 2017 by avibootz

Related questions

1 answer 191 views
2 answers 327 views
4 answers 519 views
1 answer 250 views
1 answer 243 views
...