当前位置:编程学习 > JAVA >>

java小程序TestSeparated

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);
 }
}
补充:软件开发 , Java ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,