-2
BigInteger 개체로 구성된 배열을 만들었습니다. 배열에 숫자를 할당하려고 할 때 기호 오류를 찾을 수 없습니다. 너 나 좀 도와 줄 수있어? 즉 코드이다 :BigInteger valueOf 메서드가 기호를 찾을 수 없습니다.
import java.io.*;
import java.util.*;
import java.math.BigInteger;
public class Solution
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int t1= in.nextInt();
int t2= in.nextInt();
int n= in.nextInt();
BigInteger[] arr = new BigInteger[n];
arr[0] = new BigInteger.valueOf(t1);
arr[1] = new BigInteger.valueOf(t2);
}
}
입력 값이 0 1~5 되며 이는 에러이다
Solution.java:15: error: cannot find symbol
arr[0] = new BigInteger.valueOf(t1);
^
symbol: class valueOf
location: class BigInteger
Solution.java:16: error: cannot find symbol
arr[1] = new BigInteger.valueOf(t2);
^
symbol: class valueOf
location: class BigInteger
2 errors