📄 test.java
字号:
package STRING;
public class Test {
public static void main(String[] args) {
Test test = new Test();
String a = "abcdef";
String x = "ABCDE";
String name = "administrator.com";
System.out.println("String-a: "+a);
System.out.println("String-x: "+x);
System.out.println("String-name: "+name);
//将一个串连接到别一个串的尾部
String b = a.concat("ghijkl");
System.out.println("concat: "+b);
b = a.replace('b','@');
System.out.println("replace: "+b);
b = a.substring(3,6);
System.out.println("substring: "+b);
b = a.toUpperCase();
System.out.println("toUpperCase: "+b);
b = x.toLowerCase();
System.out.println("toLowerCase: "+b);
int c = a.indexOf('a');
System.out.println("indexOf: "+c);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -