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.
コード:
int r=1; System.out.println(r + (r=2));
出力は次のとおりです。
4が必要な場合はこれを使用してください
int r=1; System.out.println((r=2) + r); // execute + is left-to-right