java用for循环求各元素和publicclassSumDemo{publicstaticvoidmain(String[]args){intsum=newSumDemo().getSum();Sy...