Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MyClass
- {
- private int height;
- public MyClass()
- {
- System.out.println("bricks");
- height = 0;
- }
- public MyClass(int i)
- {
- System.out.println("Building new House that is " + i + " feet tall");
- height = i;
- }
- public void info()
- {
- System.out.println("House is " + height + " feet tall");
- }
- public void info(String s)
- {
- System.out.println(s + ": House is " + height + " feet tall");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement