首页 > 编程语言 > 详细

javaplus

时间:2017-10-29 16:29:48      阅读:246      评论:0      收藏:0      [点我收藏+]
package test; public class Human { String name; char sex; int age; float height; float weight; public Human(String Name,char Sex,int Age){ this.name=Name; this.sex=Sex; this.age=Age; } public void information(){ System.out.println(name+"\n"+sex+"\n"+age); } public void eat(){ System.out.println("eat food"); } public static void main(String[] args){ new Human("李建",‘男‘,18); } }

javaplus

原文:http://www.cnblogs.com/jgrs/p/7750173.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!