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; }