2. Point out the error(s) and how they can be fixed in the following code: public class...
Fantastic news! We've Found the answer you've been seeking!
Question:
2. Point out the error(s) and how they can be fixed in the following code:
public class OOPExercises {
public static void main(String[] args) {
A objA = new A( );
double result;
result = objA.getA( );
System.out.println("objA.a = "+ result);
}
}
public class A {
private int a = 100;
public void setA( int value) {
a = value;
}
public int getA() {
return a;
}
} //class A
Related Book For
Posted Date: