是一只有梦想的咸鱼 2020-06-03 09:17 采纳率: 75%
浏览 171
已采纳

【超基础】计算矩形面积的输出问题?

/**
   A program that computes the area of a rectangle
   and prints it out.
   All variables should be of type double.
*/
public class RectArea
{
   public static void main (String[] args)
   {
      double width = 4.25;
      double height = 3.40;

      // Compute the area of the rectangle and print it out

      // Your work here
      System.out.printIn (4.25 * 3.40);

   }
}

错误提示:

Error:

/tmp/codecheck.ZARFRR8tpj/RectArea.java:16: error: cannot find symbol
      System.out.printIn (4.25 * 3.40);
                ^
  symbol:   method printIn(double)
  location: variable out of type PrintStream
1 error

疑问:是我的输出没有转换为double类型吗?

刚接触java,求教各位大大!

  • 写回答

1条回答 默认 最新

  • threenewbee 2020-06-03 10:50
    关注

    System.out.println

    ln是 line 的缩写
    In 是什么?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#.net#的问题:End Function
  • ¥15 无法import pycausal
  • ¥15 VS2022创建MVC framework提示:预安装的程序包具有对缺少的注册表值的引用
  • ¥15 weditor无法连接模拟器Local server not started, start with?
  • ¥20 6-3 String类定义
  • ¥15 嵌入式--定时器使用
  • ¥20 51单片机学习中的问题
  • ¥30 Windows Server 2016利用兩張網卡處理兩個不同網絡
  • ¥15 Python中knn问题
  • ¥15 使用C#,asp.net读取Excel文件并保存到Oracle数据库