package com.fs.test; public class Test { public void aMethod(int a, int b) { int add = a + b;//*表示加法运算 int reduce = a - b;//*表示减法运算 int multiply = a * b;//*表示乘法运算 int divide = a/b;// a对b整除的数 /表示除法,b不能为0 System.out.println("add = " + add); System.out.println("reduce = " + reduce); System.out.println("multiply = " + multiply); System.out.println("divide = " + divide); } public static void main(String[] args) { Test t = new Test(); t.aMethod(10, 3); } }