ThetoLowerCase()method converts all characters in thestringto lowercase characters. Example classMain{publicstaticvoidmain(String[] args){ String str1 ="JAVA PROGRAMMING";// convert to lower case letters System.out.println(str1.toLowerCase()); } }// Output: java programming Syntax of toLowe...
String toLowercase (): This method converts all of the characters in the string to lowercase. For example,
String ,String转换为小写。 属性 RegisterAttribute 注解 使用给定Locale的规则将此中的所有String字符转换为小写。 事例映射基于类指定的java.lang.Character CharacterUnicode Standard 版本。 由于事例映射并不总是 1:1 字符映射,因此生成的String长度可能与原始String长度不同。
public StringtoLowerCase()参数:loc- locale value to be applied. converts all the characters into lowercase using the rules of givenLocale.返回:returns string in lowercase letter. // Java program to demonstrate// working oftoLowerCase() methodclassGfg{publicstaticvoidmain(String args[]){ String...
toLowerCase()方法是String类方法,用于将给定的字符串转换为小写。 Syntax: 句法: String String_object.toLowerCase(); Here, String_object is a String object which we have to convert into lowercase. The method does not change the string; it returns the lowercase converted string. ...
import java.util.*; class StringToLowercaseExample{ public static void main(String[] args) { //instantiating scanner object Scanner scObj = new Scanner(System.in); System.out.println("Please enter String to convert it into lowercase:"); ...
InfoThe space character in the string "The Golden Bowl" is not changed. You cannot uppercase a space. public class Program { public static void main(String[] args) {// A mixed-case string.String value1 ="The Golden Bowl";// Change casing.String upper = value1.toUpperCase(); String ...
import java.lang.*; public class StringDemo { public static void main(String[] args) { // converts all upper case letters in to lower case letters String str1 = "SELF LEARNING CENTER"; System.out.println("string value = " + str1.toLowerCase()); str1 = "TUTORIALS POINT"; System....
The method toLowerCase() converts the characters of a String into lower case characters. It has two variants: String toLowerCase(Locale locale): It converts the string into Lowercase using the rules defined by specified Locale. String toLowerCase(): It i
Learn how to convert a Java string to lowercase using the toLowerCase() method in this comprehensive guide.