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.
2 つの変数で同時に新しいオブジェクトの参照を取得する必要があります。のようなもの
Object o1,o2 = new Object();
これは可能ですか?
前もって感謝します..
これを試して:
Object o1 ,o2; o1 = o2 = new Object();
それだけではない理由:
object o1 = new object(), o2 = o1;
?