2019”N10ŒŽ28“ú

—ߘaŒ³”N“x@‹ZpŽm‘æˆêŽŸŽŽŒ±–â‘è@î•ñHŠw•”–å@‡V|‚V

‡V|‚V

ŽŸ‚ÌJava‚̃vƒƒOƒ‰ƒ€‚ðŽÀs‚µ‚½‚Æ‚«‚ɏo—Í‚³‚ê‚錋‰Ê‚Æ‚µ‚āAÅ‚à“KØ‚È‚à‚Ì‚Í‚Ç‚ê‚©B

class Inc {
@int inc (int a) { return ++a; }
}

class PlusTwo extends Inc {
@int incTwice (int a) { return inc(inc(a)); }
}

class PlusTwo2 extends PlusTwo {
@int inc (int a) { return --a; }
}

public class Calc {
@public static void main (String[] args) {
@@PlusTwo x = new PlusTwo2();
@@System.out.println(x.incTwice (5));
@}
}

‡@@‚R@@‡A@‚S@@‡B@‚T@@‡C@‚U@@‡D@‚V




“š‚¦‚Í‚±‚¿‚ç
ƒ^ƒOFJAVA
posted by ƒtƒ@[ƒXƒgƒ}ƒNƒ at 19:30| Comment(0) | R01‹ZpŽmˆêŽŸŽŽŒ±(î•ñHŠw)