[求助]两个数的比较用什么方法
程序代码如下:import java.util.Scanner;
public class CompareTwoNumber1 {
double number1,number2;
Scanner scanner;
public CompareTwoNumber1(){
System.out.println("请输入两个数:");
scanner=new Scanner(System.in);
number1=scanner.nextDouble();
number2=scanner.nextDouble();
System.out.println("较大的数是:"+max(number1,number2));
}
public static void main(String[] args) {
CompareTwoNumber1 ct= new CompareTwoNumber1();
System.exit(0);
}
}
其中加粗的一行有问题,不知道怎么办,请帮帮忙