Question: please write the output assuming the programs are correct !! } } class Base { 5) int m; 6) public Base() { m = m

please write the output assuming the programs are correct !! please write the output assuming the programs are correct !! } }class Base { 5) int m; 6) public Base() { m =

} } class Base { 5) int m; 6) public Base() { m = m + 1; } } public class Example14 extends Base { public Example14() { m = m + 1; } public static void main(String[] args) { Example14 tb = new Example14(); System.out.println(tb.m); } } public class Example12 { public static void main(String args[]) { Test s = new Test("Hello!", "I love JAVA."); System.out.println(s.toString(); } } class Test { String s1, s2; public Test(String stri, String str2) { $1 = stri; S2 = str2; } public String toString() { return $1 + 2; } } class Father { String name = "Father"; int age = 45; public int getAge() { return age; } public String getName() { return name; } public void setAge(int a) { age = a; } 7) 8) } class Child extends Father { String name = "Child"; int age = 18; public int getAge() { return age + 1; } } class Example11 { public static void main(String args[]) { Father person = new Child(); System.out.println(person.getAge()); person.setAge(30); System.out.println(person.getAge()); System.out.println(person.getName()); } } class ParentClass{ int x = 1; int sum(int a, int b, int c){ return a + b + c; } int sum(int a, int b){ return a + b; } } class Childclass extends ParentClass{ public ChildClass() { X = 10; } int sum(int a, int b){ return a + b + 1; } } public class Example10{ public static void main(String args[]){ ParentClass p=new ChildClass(); System.out.println(p.sum(5,5,5)); System.out.println(p.sum(5,5)); System.out.println(p.x); } } class Test { int a = 10; void me (Test obj) { 9)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!