📌  相关文章
📜  在不使用任何循环或赋值运算符的情况下将一个字符串复制到另一个字符串 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:37.883000             🧑  作者: Mango

代码示例1
public class MyServerSide {

    public static void main(String[] args) {
        String str1 = "Hello World!;
        String str2;
        for (int 1=0; i < str1.length(); i++){
            if (i>=3){
                str2.charAt(i) = str1.charAt(i);//Here is the problem. It gives me an error
                                                //Saying that the left argument must be a 
                                                //variable

            }//End of if statement
        }//End of for loop
    }//End of main method
}//End of class