我有一个程序,我想完成在这个程序中的空白代码(....) 它会是什么?字符串方法和字符串修改
package exr3;
public class Exr3 {
public static void main(String[] args) {
String str1 ="I like ";
String str2 ="programming ";
String str3 ="In Java ";
String str4;
System.out.println(str1.length());
str4= (.......) ;//*how can concatenate the strings str1, str2, and str3 in str4*
System.out.println(str4);
str1= str1.toLowerCase();
System.out.println(str1);
System.out.println(....);//* how can returns the index of the first occurrence of the string "Love" in str1*
}
}
你甚至试图只使用'+',这会很有意义吗? – csmckelvey