Public? Class? test
{
Public? Static electricity Invalid? main(String[]? Parameter)
{
int[]? arr? =? New? int[]{2,3,4,5,6,7,8 };
system . out . println(sum . sum(arr));
system . out . println(sum 2 . sum(arr));
}
Private? Static electricity Class? Sum2
Public? Static electricity int? sum(int[]? args){
int? sum? =? 0;
For what? (int? Me? :? Parameter)
{
sum? +=? Me;
}
Return? Sum;
}?
}
}
Class? Sum? {
Public? Static electricity int? sum(int[]? args){
int? sum? =? 0;
For what? (int? Me? :? Parameter)
{
sum? +=? Me;
}
Return? Sum;
}?
}