package project1_9;
public class HelloWorld {
// 定义静态变量score1
static int score1 = 86;
//定义静态变量score2//
static int score2 = 92;
//定义静态变量sum,并且求和
public static int sum(){
int sum =score1+score2;
return sum;
}
public static void main(String[] args) {
System.out.println("总分:" + sum);
}
}
yanrun
相关分类