“`
package wc;
public class as {
String name;
String sex;
int age;
float score;
void fanfa(String n,String s,int a,float sc){
name=n;
sex=s;
age=a;
score=sc;
}
void shuchu(){
System.out.printf(“姓名:”+name);
System.out.printf(“性别:”+sex);
System.out.printf(“年龄:”+age);
System.out.printf(“分数:”+score);
}
public static void main(String[] args) {
// TODO 自动生成的方法存根
as stu1=new as();
stu1.fanfa(“张某”, “男”, 20, 90);
stu1.shuchu();
}
“`