我是Java的初学者。有人可以帮我识别并修复以下代码中的错误吗?谢谢!
import java.util.Scanner;
import java.util.Random;
public class p6_35
{
public static void main( String[] args )
{
Scanner input = new Scanner( System.in );
Random randomNumbers = new Random();
toMultiply();
}
public static void toMultiply();
{
int number1 = randomNumbers.nextInt();
int number2 = randomNumbers.nextInt();
System.out.printf( "How much is %d times %d?\n", number1, number2 );
int answer = input.nextInt();
int corrAns = number1 * number2;
if( corrAns == answer )
{
System.out.print( "Very good!" );
}
while( corrAns == answer )
{
number1 = randomNumbers.nextInt();
number2 = randomNumbers.nextInt();
System.out.printf( "How much is %d times %d?\n", number1, number2 );
answer = input.nextInt();
corrAns = number1 * number2;
if( corrAns == answer )
{
System.out.print( "Very good!" );
}
}
while( corrAns != answer )
{
System.out.printf( "No. Please try again.");
answer = input.nextInt();
corrAns = number1 * number2;
if( corrAns == answer )
{
System.out.print( "Very good!" );
}
}
}
}