java小程序TestSeparated

2014-11-24 10:21:39 · 作者: · 浏览: 0
package ch2;
public class TestSeparated {
int a, b;
double salary = 1000, tax = 0.01;

public void func(int x, int y) {
double result;
result = salary * tax;
System.out.println(result);
a = x;
b = y;
System.out.println(a + "," + b);
}

public static void main(String[] args) {
/*TestSeparated obj = new TestSeparated();
obj.func(10, 20);*/
new TestSeparated().func(10, 20);
}
}