![](https://img-blog.csdnimg.cn/20191031131908813.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Java
동경
这个作者很懒,什么都没留下…
展开
-
while 与 do...while 的区别和使用方法
While while(condition){ //do your job } do…while do{ //do your job }while(condition); 区别: do-while中的语句最少会循环一次,但while只要condition不满足的话就不会执行内部语句 举个while的例子: public static void testWhile() { ...原创 2020-05-07 22:56:20 · 290 阅读 · 0 评论 -
关于switch...case的理解
class CodeRunner{ public static void main(String[] args){ switch(option) { case 1: System.out.println("option 1"); case 2: System.out.println("option 2");break; case 3: System....原创 2020-04-09 03:42:02 · 132 阅读 · 0 评论 -
java继承问题 extends
If both A and B implement a method f() for example, and the static type is A and the dynamic type involved is C for a method invocation, then B.f() will be invoked: B extends A, C extends B public A.f...原创 2019-10-30 22:57:01 · 192 阅读 · 0 评论