Advertisement
Guest User

Untitled

a guest
Apr 21st, 2015
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. class ParentClass {
  2. private int field1;
  3. protected char field2;
  4. public void method1() {
  5. System.out.println(field1);
  6. }
  7. protected void method2() {
  8. System.out.println(field2);
  9. }
  10. }
  11. class QuestionClass extends ParentClass {
  12. public void method3() {
  13. System.out.println("QuestionClass#method3()");
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement