이 코드는 정렬을 구현해야합니다.
는 "삽입가 해결 될 수 없다" 는 "StdRandom가 해결 될 수 없다"
,
은 "STDOUT가 해결 될 수 없다":
나는 3 오류가 있습니다.
가져올 라이브러리가 있습니까?StdRandom, StdOut, Insertion을 (를) 확인할 수 없습니다.
public class randomDoubles
{
public static void main(String[] args)
{
int N = Integer.parseInt(args[0]);
Double[] a = new Double[N];
for(int i = 0; i < N; i++)
a[i] = StdRandom.uniform(); // error: StdRandom cannot be resolved
Insertion.sort(a); // error: Insertion cannot be resolved
for (int i = 0; i < N; i++)
StdOut.println(a[i]); // error: StdOut cannot be resolved
}
}
감사합니다. –
'StdOut.println'이 아닌 인쇄를 위해'System.out.println()'을 사용해야합니다. 그리고'Insertion' 클래스는 어디에 있습니까 ?? 왜'StdRandom'을 사용하고 계십니까? –
이클립스에 있다면 command-shift-o (창에서 ctrl-shift-o)를 눌러 가져올 항목을 가장 잘 추측하도록하십시오. – JoshRagem