Which two code fragments, when inserted at // insert code here, enable the code to compile and print 12?

Given: Which two code fragments, when inserted at // insert code here, enable the code to
compile and print 12?

Given: Which two code fragments, when inserted at // insert code here, enable the code to
compile and print 12?

A.
Calc c = new Calc(); int n3 = c.findMid(n1,n2);

B.
int n3 = super.findMid(n1,n3);

C.
Calc c = new Mid(); int n3 = c.findMid(n1, n2);

D.
Mid m1 = new Calc(); int n3 = m1.findMid(n1, n2);

E.
int n3 = Calc.findMid(n1, n2);



Leave a Reply 2

Your email address will not be published. Required fields are marked *


xxx

xxx

class Mid{
public int findMind(int n1, int n2){
return(n1+n2)/n2;
}
}

public class Access extends Mid {
public static void main(String[] args){
int n1 = 22;
int n2 = 2;
// Access a = new Access();
Mid a = new Access();
int n3 = a.findMind(n1, n2);
System.out.println(n3);
}
}

ad