scjp卡壳题
2024-09-07 23:00:56
1.
void looper() {
int x = 0;
one: while (x < 10) {
two: System.out.println(++x);
if (x > 3) {
break two;
}
}
}
break适用场合:<1>switch<2>for/while循环
if语句中也不能用~【注】将two换成one就可以了。
2.
"this" keyword can not appears in the main method, because static method can not references a member variable like "this";
3.这样赋值也是合法的:
Integer[] a=new Integer[5];
for(int i=0;i<5;a[i++]=i*10);
4.方法名和类名相同,而且也不是构造子,也是合法的,不过不推荐而已。
public class ClazzA {
public void ClazzA(){
return;
}
}
最新文章
- QQ远程桌面的使用
- .net中自定义过滤器对Response内容进行处理
- windows命令行
- 教你利用iframe在网页中显示天气
- vim 配置文件 ,高亮+自动缩进+行号+折叠+优化
- Android Training精要(六)如何防止Bitmap对象出现OOM
- hdu 3460
- Swift - 设置UIView的背景色和背景图片
- django admin.py settings 操作
- leangoo
- c#模拟js escape方法(转)
- beautifulSoup模块
- IO流之字节流知识总结
- 【机器学习实战 第九章】树回归 CART算法的原理与实现 - python3
- 小程序wx:for Do not set same key \";NaN\"; in wx:key.
- RabbitMQ中的RPC实现
- MySQL的FIND_IN_SET()函数
- Redis在python中的使用
- ASP.NET Newtonsoft 序列化反序列化
- 8皇后问题(c++/python实现)