我们先称之为:{}阻止以及如何在java中使用它? [英] what we call first:{} block and how to use it in java?
本文介绍了我们先称之为:{}阻止以及如何在java中使用它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好所有
i我是java的新手,我看到一些复杂的代码,同时在网上查看我的程序解决方案
hello all
i am new to java and i see some complicated code while see solution for my program on the net
int a=5;
int b=10;
first:{
second:{
third:{
if(a==b>>1){
break second;
}
System.out.println(a);
}
System.out.println(b);
}
任何人都可以解释一下这类代码的含义以及我们如何在程序中深入使用它,我无法找到这种类型的代码我的java书请帮助我提前谢谢
can anybody explain me what is the meaning of this type of code and how we deeply use it in program and i cant find this type of code in my java book please help me thanks in advance
推荐答案
我建议你忘记它,因为它远离'好'的代码。坚持在一本体面的Java书中学到的东西,或者参见 http://download.oracle.com/javase/tutorial /index.html [ ^ ]官方教程。
I would suggest you forget it, as it is far from 'good' code. Stick to what you learn in a decent Java book, or see http://download.oracle.com/javase/tutorial/index.html[^] for the official tutorials.
这叫做封装
,这是该语言的好处之一:
http://www.tutorialspoint.com/java/java_encapsulation.htm [ ^ ]
That is calledencapsuation
and is one of the benefits of the language:
http://www.tutorialspoint.com/java/java_encapsulation.htm[^]
这篇关于我们先称之为:{}阻止以及如何在java中使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文