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
提交
取消