Question: 4. Find the error, correct it and write output. package javaapplication285; public class Test { public int a, b; public Test ( int i, int
4. Find the error, correct it and write output. package javaapplication285; public class Test \{ public int a, b; public Test ( int i, int j ) \{ package javaapplication 285 ; public class JavaApplication285 \{ public static void main(String|l args) \{ Test ob = new Test (15,20); System.out.println("ob.a and ob.b before call:" +ob.a +" " +ob.b); System.out.println("ob.a and ob.b after call:" + ob.a +" " tob.b); 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
