java - 为什么我的 ' . ' 在我的代码中无法识别?
问题描述
public class NumberTester
{
public static void main (String [] agrs)
{
int numberOfPhones, storagePerPhone, totalStorage;
numberOfPhones =20; storagePerPhone =32;
totalStorage = numberOfPhones * storagePerPhone;
System.out.printIn("If you have");
System.out.printIn(storagePerPhone + " storage per phone and");
System.out.printIn(numberOfPhones + " phones, then");
System.out.printIn("the total amount of storage is " +totalStorage);
}
}
当我去编译代码时,'System.out.printIn' 没有被识别
解决方案
字体欺骗了你它System.out.println
不是System.out.printIn
它l
(小L)不是I
(大写i)。两者看起来相似。
推荐阅读
- events - Esper 没有保护对象并导致聚合对象 oom
- android - 在android中单击一个按钮而不是它的操作按钮时关闭一个快餐栏
- java - 如何从 Mockito 类中为不返回值的 Save 方法调用/生成异常?
- react-native - React-Native run-android:expo SDK 需要 Expo 才能运行。似乎本机 Expo 模块不可用,并且此代码未在 Expo 上运行
- typescript - TypeScript:销毁参数时如何指定函数参数的类型?
- physics - ARKit 物理对象逐步通过跟踪平面
- jenkins - 如何使用 Jenkins 将归档文件发布到 Confluence
- javascript - 播放幻灯片动画时 Div 的宽度减小
- r - 如何查找年和周格式的两个日期之间的时间间隔,例如。201630 和 201951 在 r
- docker - 如何修复“提供但未定义的标志:-console”