以下のエラーが表示されます。
C:\Area52\AndroidProgramming>javac -d . ex1.java ex1.java:27: エラー:
println(Object,Object) に適したメソッドが見つかりません
System.out.println(players.get(0), batAvg.get(0)); ^ method PrintStream.println(Object) is not applicable (actual and formal argument lists differ in length)
これが私のコードです:
package one.exercise;
import java.util.*;
public class ex1
{
public static void main(String[] args)
{
ArrayList players = new ArrayList();
players.add("Joey");
players.add("Thomas");
players.add("Joan");
players.add("Sarah");
players.add("Freddie");
players.add("Aaron");
ArrayList batAvg = new ArrayList();
batAvg.add(.333);
batAvg.add(.221);
batAvg.add(.401);
batAvg.add(.297);
batAvg.add(.116);
batAvg.add(.250);
System.out.println(players.get(0), batAvg.get(0));
System.out.println(players.get(1)); //+ batAvg.get(1));
System.out.println(players.get(2)); //+ batAvg.get(2));
System.out.println(players.get(3)); //+ batAvg.get(3));
System.out.println(players.get(4)); //+ batAvg.get(4));
System.out.println(players.get(5)); //+ batAvg.get(5));
}
}