Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package javaapplication8;
- /**
- *
- * @author Dicha
- */
- public class Animal {
- protected int legs;
- public Animal (){
- }
- protected Animal (int legs){
- this.legs=legs;
- System.out.println("Animal Legs + legs");
- }
- public void walk(){
- System.out.println("Animal can walk.");
- }
- public void eat(){
- System.out.println("Animal can eat.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement