1 Star 0 Fork 0

chpeng/java_study

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Sample09.java 801 Bytes
一键复制 编辑 原始数据 按行查看 历史
chpeng 提交于 2023-11-21 19:34 +08:00 . java learn first
public class Sample09 {
public static void main(String[] args) {
String txt = "HelloWorld";
System.out.println("The length of the txt string is:" + txt.length());
System.out.println(txt.toUpperCase());
System.out.println(txt.toLowerCase());
System.out.println(txt.indexOf("World"));
String firstName = "Chen";
String lastName = "Haipeng";
System.out.println(firstName + " " + lastName);
System.out.println(firstName.concat(lastName));
String txt1 = "We are the so-called \"Vikings\" from the north.";
String txt2 = "It\'s alright";
String txt3 = "The character \\ is called backslash.";
System.out.println(txt1);
System.out.println(txt2);
System.out.println(txt3);
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chp2020/java_study.git
git@gitee.com:chp2020/java_study.git
chp2020
java_study
java_study
master

搜索帮助