Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class constru {
- int age,weight,height;
- String name;
- public constru(String name, int age, int height, int weight) {
- this.name = name;
- this.age = age;
- this.height = height;
- this.weight = weight;
- }
- public void getInfo() {
- System.out.printf("Name : %s\n",this.name);
- System.out.printf("Age : %d\n",this.age);
- System.out.printf("Height : %d (arround that)\n",this.height);
- System.out.printf("Weight : %d (arround that)",this.weight);
- }
- }
- public class con{
- public static void main(String[] args) {
- constru info = new constru("Zamm", 19, 175, 50);
- info.getInfo();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment