Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下语句的 Java 等效指令是什么:
String name; cout << "So your name is " << name << endl;
或者在 C# 中
console.writeline("So your name is {0} ", name);
String name; cout<<"So your name is "<<name<<endl;
相当于:
String name = ...; System.out.println("So your name is " + name);
和:
Console.WriteLine("So your name is {0}", name);
System.out.printf("So your name is %s", name);