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に変換するにはどうすればよいですか
int c = 0; // Code c = !c; return c;
int を返す場合return c == 0 ? 1 : 0;
return c == 0 ? 1 : 0;
代わりにブール値を使用することをお勧めします。
public boolean method() { boolean bool = false; return !bool; }