y‰SŽÒzJavaŽ¿–⥑ ..
756:ƒfƒtƒHƒ‹ƒg‚Ì–¼–³‚µ‚³‚ñ
08/02/24 23:40:36
Java‚̕׋Žn‚߂܂µ‚½B
ƒAƒNƒZƒXAEŽqprotected‚ɂ‚¢‚Ä—‰ð‚ª‘«‚è‚È‚¢‚̂ŋ³‚¦‚Ä‚‚¾‚³‚¢B
protected‚‚¯‚邱‚Æ‚ÅA
wŽ©•ª‚̃Nƒ‰ƒX“à‚̃ƒ\ƒbƒh –”‚Í Œp³‚³‚ꂽƒTƒuƒNƒ‰ƒX“à‚̃ƒ\ƒbƒh‚©‚炵‚©ƒAƒNƒZƒX‚Å‚«‚È‚¢x
‚»‚̂悤‚É’¼Š´“I‚ÉŠ´‚¶‚½‚̂ł·‚ªA
ŠÔˆá‚Á‚Ä‚¢‚邿‚¤‚ÅB
public class Purotekuto {
public static void main(String[] args) {
Test21 hogehoge = new Test21();
System.out.println( "’l‚ðo—ÍF" + hogehoge.protectedInteger );
}}
public class Test21 {
protected int protectedInteger;
Test21() {
this.protectedInteger = 0;
}
public void setValue( int value ) {
this.protectedInteger = value;
}
public int getValue( int value ) {
return this.protectedInteger;
}}
‚±‚̃R[ƒh‚Å‚ÍAmain()‚©‚çAƒNƒ‰ƒXTest21‚̃ƒ“ƒoAprotectedInteger‚ɃAƒNƒZƒX‚Å‚«‚¸‚ÉA
ƒGƒ‰[‚©‰½‚©‚É‚È‚é‚ÆŽv‚Á‚½‚̂ł·‚ªA•’ʂɓ®‚«‚Ü‚µ‚½B
Ž©•ª‚Ìl‚¦‚̉½‚ª‚Ü‚¸‚¢‚̂łµ‚傤‚©BBB
ŽŸƒy[ƒW‘±‚«‚ð•\ަ1‚ð•\ަÅVƒŒƒX•\ަƒXƒŒƒbƒh‚ÌŒŸõ—ÞŽ—ƒXƒŒˆê——˜b‘è‚̃jƒ…[ƒX‚¨‚Ü‚©‚¹ƒŠƒXƒg¥ƒIƒvƒVƒ‡ƒ“‚ð•\ަ‰É‚‚Ԃµ2ch
4252“ú‘O‚ÉXV/275 KB
’S“–:undef