Advertisement
nawamkihafahd

Untitled

Oct 12th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public class MyClass
  2. {
  3. // instance variables - replace the example below with your own
  4. int height;
  5. MyClass()
  6. {
  7. System.out.println("bricks");
  8. height = 0;
  9. }
  10. MyClass(int i)
  11. {
  12. System.out.println("Building new House that is "+ i + " feet tall");
  13. height = i;
  14. }
  15. void info()
  16. {
  17. System.out.println("House is " + height+ " feet tall");
  18. }
  19. void info(String s)
  20. {
  21. System.out.println(s + ": House is "+ height + " feet tall");
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement