I'm studying this code about Java Inheritance(from Core 2 java bk by Hoffman), and here's a code in the class MethodPointerTest.java :
Method square = MethodPointerTest.class.getMethod("square", double.class);
Later in the class there'sa function like so:
public static double square(double x){
return x * x;
}
why is the seocnd argument of the getMethod function:
double.class
Vs just saying "double"
Thank You