由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - 我说说两个曾经被人EMBARASS的问题
相关主题
要随机返回一个Set的里的元素, 如何操作呢?Eclipse has problem with CVS
问一道关于Vector的题java compilation question
Why java.lang.Iterable depends on java.util.Iteratoreclipse help
HashMap 怎样循环用更快?eclipse 用户
请问在Java中有没有停止一切的命令Re: how to integrate java api doc with e
Strongly recommend EclipseEclipse vs. Jbuilder X ?
How about Swing?有人用eclipse吗?
COOL JAVA IDEtogether for eclipse 里能否指定一个目录保存那些图
相关话题的讨论汇总
话题: goto话题: java话题: break话题: embarass话题: label
进入Java版参与讨论
1 (共1页)
F****n
发帖数: 3271
1
1. Does Java support goto (You can type goto in Eclipse and you will be
cheated...)
2. How to declare label in Java ( I sincerely did not know).
g*****g
发帖数: 34805
2
hehe, I don't think you can use goto, but you can use
label:
break label;
That can be handy in multiple level of iterations.

【在 F****n 的大作中提到】
: 1. Does Java support goto (You can type goto in Eclipse and you will be
: cheated...)
: 2. How to declare label in Java ( I sincerely did not know).

c*****t
发帖数: 1879
3
Java can break to a label (which must occur before the loop in which
the break is located). It can be used to break out several loops at
once.
To do a forward break (i.e. goto), you can use a simple trick like this:
do
{
if (...)
break;
}
while (false);

【在 F****n 的大作中提到】
: 1. Does Java support goto (You can type goto in Eclipse and you will be
: cheated...)
: 2. How to declare label in Java ( I sincerely did not know).

T*********g
发帖数: 496
4
没GOTO, 不过好像JCP打算要加。
label之在循环能用。没啥价值吧。。。

【在 F****n 的大作中提到】
: 1. Does Java support goto (You can type goto in Eclipse and you will be
: cheated...)
: 2. How to declare label in Java ( I sincerely did not know).

1 (共1页)
进入Java版参与讨论
相关主题
together for eclipse 里能否指定一个目录保存那些图请问在Java中有没有停止一切的命令
W4T EclipseStrongly recommend Eclipse
eclipse: The New Look Isn't NativeHow about Swing?
eclipse 也不怎么样吗?COOL JAVA IDE
要随机返回一个Set的里的元素, 如何操作呢?Eclipse has problem with CVS
问一道关于Vector的题java compilation question
Why java.lang.Iterable depends on java.util.Iteratoreclipse help
HashMap 怎样循环用更快?eclipse 用户
相关话题的讨论汇总
话题: goto话题: java话题: break话题: embarass话题: label