diff options
Diffstat (limited to 'java/code/pTwo/ClassTwo.java')
-rw-r--r-- | java/code/pTwo/ClassTwo.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/java/code/pTwo/ClassTwo.java b/java/code/pTwo/ClassTwo.java new file mode 100644 index 0000000..7ea1f81 --- /dev/null +++ b/java/code/pTwo/ClassTwo.java @@ -0,0 +1,12 @@ +package pTwo; +import pOne.ClassOne; + +public class ClassTwo extends ClassOne { + public void methodTwo() { + System.out.println("MethodTwo in ClassTwo"); + + // Accessing variable and method from ClassOne + System.out.println("Variable from ClassOne: " + variableOne); + methodOne(); + } +} |