java - 出现奇怪的错误,不知道如何解决
问题描述
尝试制作一堆方法并打印出它们的结果。我认为我所拥有的一切都很好,但是我遇到了一些奇怪的错误,我不知道它们是什么意思。由于某种原因,我什至无法打印出一个简单的“测试”
我已经写出了方法,但我还没有调用它们,因为我什至无法在不终止的情况下让它工作。
System.out.print("Test");
public static double pow(double a, double b){
return Math.pow(a, b);
} //Use 3.0 and 2.0
public static double sqrt(double x) {
return Math.sqrt(x);
} //25.0
public static int max(int a, int b) {
if ( a < b ) {return b;}
else {return a;}
} //Use 6 and 2
public static double max(double a, double b) {
if ( a < b ) {return b;}
else {return a;}
} //Use -50.0 and 7.0
public static double random() {
return Math.random();
}
我至少想打印测试词。也用于调用时工作的方法。
解决方案
推荐阅读
- react-redux - 卸载后重新选择带有道具的选择器
- java - 序列化为日期时间、对象
- python - 查找已抓取页面的正确 XPath 时出现问题
- python - Django Rest 显示 TemplateDoesNotExist
- matlab - 在matlab中计算列的间隔平均值(间隔不固定)
- javascript - 从引导下拉菜单触发模式
- javascript - 如何在 React Native ART 中绘制圆角矩形
- stm32 - 正确配置 STemWin 以将 FlexColor 驱动程序与 ST7735 显示驱动程序一起使用
- python - 自定义数据生成器
- c# - 在读取 CSV 文件时替换值并保存文件(C#)