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.
任何人都可以帮助我找出我正在做的错误。预期打印4%2为 0。我尝试了两种方式。
4%2
没有这样的方法调用 System.out.printf(int) 与整数参数所以使用 print 或 println
System.out.print(4%2);
那么输出为0