tolowercase_Java String toLowerCase()方法与示例
生活随笔
收集整理的這篇文章主要介紹了
tolowercase_Java String toLowerCase()方法与示例
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
tolowercase
字符串toLowerCase()方法 (String toLowerCase() Method)
toLowerCase() method is a String class method, it is used to convert given string into the lowercase.
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.
在這里, String_object是一個String對象,我們必須將其轉換為小寫形式。 該方法不更改字符串。 它返回小寫轉換后的字符串。
Example:
例:
Input:str = "Welcome at IncludeHelp!"Function call:ans = str.toLowerCase()Output:ans = "welcome at includehelp!"Code:
碼:
public class Main {public static void main(String[] args) {String str = "Welcome at IncludeHelp!";String ans = str.toLowerCase();System.out.println("str = " + str);System.out.println("ans = " + ans); } }Output
輸出量
str = Welcome at IncludeHelp! ans = welcome at includehelp!翻譯自: https://www.includehelp.com/java/string-toLowerCase-method-with-example.aspx
tolowercase
總結
以上是生活随笔為你收集整理的tolowercase_Java String toLowerCase()方法与示例的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 网络名称 转换 网络地址_网络地址转换|
- 下一篇: “洁诚洗志期暮年”上一句是什么