Created
January 28, 2013 14:25
-
-
Save antonyxia/4655904 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class People { | |
| float hight,weight; | |
| String head,ear,mouth; | |
| void speak(String s){ | |
| System.out.println(s); | |
| } | |
| } | |
| class A{ | |
| public static void main (String args[]){ | |
| People zhubajie; | |
| zhubajie = new People(); | |
| zhubajie.weight = 200f; | |
| zhubajie.hight = 1.70F; | |
| zhubajie.head = "大头"; | |
| zhubajie.ear = "两只大耳朵"; | |
| zhubajie.mouth = "一直大嘴"; | |
| System.out.println("重量"+zhubajie.weight+"身高"+zhubajie.hight); | |
| System.out.println(zhubajie.head+zhubajie.mouth+zhubajie.ear); | |
| zhubajie.speak("师傅,咱们别去西天了,改去月宫吧 "); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment