package com.myfirst;import java.util.Arrays;public class Helloworld { public static void main(String[] args){ Helloworld yu=new Helloworld(); yu.num(98,52,81,79); } public int num(int []scores){ Arrays.sort(scores); System.out.println(Arrays.toString(scores)); int a=0; for(int i=0;i<scores.length;i++){ a++; } System.out.println("成绩的个数为:"+a); return a; }}为什么对yu.num(98,52,81,79);中的num报错呢?找不到这个方法。。。The method num(int[]) in the type Helloworld is not applicable for the arguments (int, int, int, int)
添加回答
举报
0/150
提交
取消