Guest User

Untitled

a guest
Oct 12th, 2017
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. class MyClass extends MainClass {  
  2.     int height;  
  3.    MyClass() {  
  4.     System.out.println("bricks");  
  5.     height = 0;  
  6.    }  
  7.    MyClass(int i) {  
  8.    System.out.println("Building new House that is "  
  9.    + i + " feet tall");  
  10.      height = i;  
  11.     }  
  12.     void info() {  
  13.      System.out.println("House is " + height  
  14.      + " feet tall");  
  15.     }  
  16.     void info(String s) {  
  17.      System.out.println(s + ": House is "  
  18.      + height + " feet tall");  
  19.     }  
  20.   }
Advertisement
Add Comment
Please, Sign In to add comment