伙计们,网上有什么地方可以找到标准Java类的内容列表吗? 说我想知道Math类包含哪些函数。有人可以指出我正确的方向吗?
作为一名初学者,只是感觉我的方式。抱歉这个愚蠢的问题: - )
提前致谢,
戴夫
答案 0 :(得分:4)
Oracle Java API
答案 1 :(得分:3)
如果您无法访问Internet或JavaDoc,则可以使用javap
实用程序。它与JDK捆绑在一起。
这就是你使用它的方式
C:\>javap java.lang.Math
Compiled from "Math.java"
public final class java.lang.Math {
public static final double E;
public static final double PI;
public static double sin(double);
public static double cos(double);
public static double tan(double);
public static double asin(double);
public static double acos(double);
public static double atan(double);
public static double toRadians(double);
public static double toDegrees(double);
public static double exp(double);
public static double log(double);
public static double log10(double);
public static double sqrt(double);
public static double cbrt(double);
public static double IEEEremainder(double, double);
public static double ceil(double);
public static double floor(double);
public static double rint(double);
public static double atan2(double, double);
public static double pow(double, double);
public static int round(float);
public static long round(double);
public static double random();
public static int abs(int);
public static long abs(long);
public static float abs(float);
public static double abs(double);
public static int max(int, int);
public static long max(long, long);
public static float max(float, float);
public static double max(double, double);
public static int min(int, int);
public static long min(long, long);
public static float min(float, float);
public static double min(double, double);
public static double ulp(double);
public static float ulp(float);
public static double signum(double);
public static float signum(float);
public static double sinh(double);
public static double cosh(double);
public static double tanh(double);
public static double hypot(double, double);
public static double expm1(double);
public static double log1p(double);
public static double copySign(double, double);
public static float copySign(float, float);
public static int getExponent(float);
public static int getExponent(double);
public static double nextAfter(double, double);
public static float nextAfter(float, double);
public static double nextUp(double);
public static float nextUp(float);
public static double scalb(double, int);
public static float scalb(float, int);
static {};
}
C:\>
答案 2 :(得分:1)
您可以在此处找到所有标准java类中的所有方法:Java API Overview