欧美1区2区3区激情无套,两个女人互添下身视频在线观看,久久av无码精品人妻系列,久久精品噜噜噜成人,末发育娇小性色xxxx
父類Base中定義了若干get方法,以及一個(gè)sum方法,sum方法是對一組數(shù)字的求和。請?jiān)谧宇?Sub 中重寫 getX() 方法,使得 sum 方法返回結(jié)果為 x*10+y
輸入描述:
整數(shù)
輸出描述:
整數(shù)的和
示例1
輸入
1 2
輸出
12
加載中...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNextInt()) { int x = scanner.nextInt(); int y = scanner.nextInt(); Sub sub = new Sub(x, y); System.out.println(sub.sum()); } } } class Base { private int x; private int y; public Base(int x, int y) { this.x = x; this.y = y; } public int getX() { return x; } public final int getY() { return y; } public final int sum() { return getX() + getY(); } } class Sub extends Base { public Sub(int x, int y) { super(x, y); } //write your code here...... }
1 2
12