我正在为一个类制作这个Java文件,但是当我使用测试运行器并完成操作时,控制台中根本不会出现System.out.println()。控制台表示操作已成功完成,但是没有任何反应。
public class ShapeMetrics {
public static float getAreaOfRectangle(float width, float height) {
float area = width * height;
return area;
}
}
public class TestRunner {
public static void main(String args[]){
float w = 6.1F;
float h = 3.3F;
float area = ShapeMetrics.getAreaOfRectangle (w, h);
System.out.println("The area of the rectangle is: " + area);
System.out.print("test");
}
}