abalfazl hossein wrote:
This code thorws an exception in this line:Arrays.sort(array);
why?
--------------------------------------------
the syntax looks ok, but for the main method
guess the exception ws NoSuchMethodFoundException
TRY
import java.util.Arrays;
public class Main {
public static void main(
String[] argv)
{
int i;
int array[] = {12,9,4,99,120,1,3,10};
Arrays.sort(array);
for (i = 0; i < array.length; i++)
System.out.println(array[i]);
}
}