public class HelloWorld{
public static void main(String[] args) {
project1 = "我爱慕课网";
project2 = "www.imooc.com";
System.out.println("project1");
System.out.println("project2");
}
}
两个project变量没有变量类型,然后在用println输出变量时不用加引号
String project1="我爱慕课网";
String project2="www.imooc.com";
System.out.println(project1+project2);
也可以
String project1="我爱慕课网";
String project2="www.imooc.com";
System.out.println(project1);
System.out.println(project2);
string