慕田峪3939182
2016-11-18 09:40
模等于(%=)是什么意思啊??
three 每次都在上一次的基础上赋值。
three%=one; ------》three=three%one
public class HelloWorld{
public static void main(String[] args) {
int one = 10 ;
int two = 20 ;
int three = 0 ;
three=one+two;
System.out.println("three=one+two ==>"+three);
three+=one;
System.out.println("three+=one ==>"+three);
three-=one;
System.out.println("three-=one ==>"+three);
three*=one;
System.out.println("three*=one ==>"+three);
three/=one;
System.out.println("three/=one ==>"+three);
three%=one;
System.out.println("three/%=one ==>"+three);
这个中,three 是不是每次都在上一次的基础上赋值??
three%=one; 这个赋值是什么意思没搞明白
Java入门第一季(IDEA工具)升级版
1165523 学习 · 17586 问题
相似问题