Advertisement
RazorBlade57

Dog Code

Sep 30th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1.  
  2. import static java.lang.System.*;
  3.  
  4. public class Code
  5. {
  6.    public static void main(String args[]) {
  7.        Code dog = new Code();
  8.       dog.whimper();
  9.       dog.speak();
  10.       dog.speakTwice();
  11.        
  12.        
  13.        
  14.    }
  15.  
  16.  
  17.        public void speak()
  18.  
  19.        {
  20.            System.out.println("Bork!");
  21.        }
  22.  
  23.        public void speakTwice()
  24.  
  25.        {
  26.            System.out.println("ROOF");
  27.            System.out.println("ROOF");
  28.        }
  29.        
  30.        public void whimper(){
  31.            
  32.            System.out.println("whimper");
  33.            
  34.        }
  35.        }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement