个人简历(java基础入门)

package my_introduce;
public class My_introduce {
String name;
int age;
String work;
String school;
String hobbies;
public My_introduce(String my_mame){
name=my_mame;
System.out.println(“我的名字是:”+name);
}
void enage(int my_age){
age=my_age;
System.out.println(“我的年龄是;”+age);
}
void enwork(String my_work){
work=my_work;
System.out.println(“我的工作是:”+work);
}
void enhobbies(String my_hobbies){
hobbies=my_hobbies;
System.out.println(“我的爱好是:”+hobbies);
}
void enschool(String my_school){
school=my_school;
System.out.println(“我的学校是:”+school);
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.out.println(“我的第一份个人简历(入门java):”);
My_introduce mine=new My_introduce(“娄零”);
mine.enage(18);
mine.enwork(“学生”);
mine.enhobbies(“游泳”);
mine.enschool(“汉阳大学”);
}
}
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/ls158390/article/details/82869126
今日推荐