![](https://static.youtibao.com/asksite/comm/h5/images/m_q_title.png)
已知类SubClass的getSum方法返回其父类成员i与类SubClass成员j的和;类SuperClass中的getSum为抽
[Java代码]
行号 代码
01 public class UainJava{
02 public static void main(String[]args){
03 SuperClass s=new SubClass();
04 System.out.printin(s.getValue());
05 System.out.printIn(s.getSum()):
06 }
07 }
08 abstract class SuperClass {
09 private int i;
10 public SuperClass(){i=5;}
11 public int getValue(){
12 return i:
13 }
14 public final abstract int getSum():
15 }
16 class SubClass extends SuperClass{
17 int j;
18 public SubClass(){
19 this(-3);
20 }
21 public SubClass(int j){
22 (1) .j=j;
23 }
24 publiC int getValue()(return j;}
25 public int getSum(){
26 return (2) .getValue()+j;
27 }
28
![](https://static.youtibao.com/asksite/comm/h5/images/solist_ts.png)