杰杰郭果
2016-05-20 12:46
public class HelloWorld{
public static void main(String[] args) {
int one = 10 ;
int two = 20 ;
int three = 0 ;
int three=one+two;
System.out.println("three=one+two==》+"three);
int three+=one;
System.out.println("three+=one==》 +"three);
int three-=one;
System.out.println("three-=one==》 +"three);
int three*=one;
System.out.println("three*=one==》 +"three);
int three/=one;
System.out.println("three/=one==》 +"three);
int three%=one;
System.out.println("three%=one==》 +"three);
==》是为了输出语句好看,像一个箭头指向结果,你也可以直接只要输出结果System.out.println(three);
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;
}
}
Java入门第一季(IDEA工具)升级版
1165172 学习 · 17581 问题
相似问题
回答 6