import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
static void example(){
https://ru.stackoverflow.com/questions
System.out.println("Hellolo!");
}
public static void main (String[] args) throws java.lang.Exception
{
example();
}
}
为什么像外星人的弦
https://ru.stackoverflow.com/questions
里面的方法不干扰程序的执行?
在 Android Studio 中注意到了这一点。IDE 仅https
通过提示突出显示
Unused label 'https' less... (Ctrl+F1)
Reports unused code labels.
应用程序编译并运行
String example(){
https://ru.stackoverflow.com/questions
return "Hello!";
}
如果从 onCreate 调用
if(DEBUG) Log.i("TAG", "example() - " + example() );
在出口处
I/TAG: example() - Hello!
在下面的表格中,IDE 已经发誓并在整行下划线
void example(){
https://ru.stackoverflow.com/questions
}
线索——label without statement
注意:外星人既不是变量也不是表达式……(在我可怜的想象中)
因为,从编译器的角度来看,您已经设置了一个
label:
名为https的标签(语法为 的无条件跳转点),后跟一个注释 (//)。在第二种情况下,没有代码可以引用此标签