y‰SŽÒzJavaŽ¿–⥑ ..
[2ch|¥Menu]
437:ƒfƒtƒHƒ‹ƒg‚Ì–¼–³‚µ‚³‚ñ
08/02/18 08:34:15
class Test {
int sum(int[] date){
int r=0;
int i;
for(i=0; i<date.length; i++)
r += date[i];
return r;
}
}

public class sample34{
public static void main(String[] args) {
Test test =new Test();
int[] date1 = new int[]{1,2,3,4,5};
int result;
result=test.sum(date1);
System.out.println(result);
}
}
‚±‚ê‚Å‚P‚T‚ª•Ô‚Á‚Ä‚­‚é——R‹³‚¦‚Ä‚­‚¾‚³‚¢B
Ž„‚Ìl‚¦‚Ísum(int[] date)‚±‚±‚Éo1,2,3,4,5}‚ð“ü‚ê‚é‚킯‚Å‚·‚æ‚ËH
‚Ådate.length‚ƂȂÁ‚Ä‚¢‚é‚©‚çA‚»‚̌”‚T‚¾‚ÆŽv‚¤‚ñ‚Å‚·‚¯‚Ç
‚·‚¢‚Ü‚¹‚ñˆÓ–¡•s–¾‚ÅEEE


ŽŸƒy[ƒW
‘±‚«‚ð•\ަ
1‚ð•\ަ
ÅVƒŒƒX•\ަ
ƒXƒŒƒbƒh‚ÌŒŸõ
—ÞŽ—ƒXƒŒˆê——
˜b‘è‚̃jƒ…[ƒX
‚¨‚Ü‚©‚¹ƒŠƒXƒg
¥ƒIƒvƒVƒ‡ƒ“‚ð•\ަ
‰É‚‚Ԃµ2ch

4251“ú‘O‚ÉXV/275 KB
’S“–:undef