?? overlap.mj
字號(hào):
/**
* This program is used to test whether your compiler can find out
* the overlapping variable scopes.
* The following program is wrong. Your compiler should find out the
* errors. And it's better to point out the exact position of the
* errors and output useful information.
*/
class Program {
static int i1 = 2; // ERROR: overlap with another global variable i1
static void main() {
int i2 = 8;
{
int i2 = 16; // ERROR: overlap with previous local
// variable i2
}
f(32);
return;
}
static int i1 = 4; // ERROR: overlap with another global variable i1
static String i1 = "123"; // ERROR: overlap with another global
// variable, even if they have different
// type
static void f(int i3) {
int i3 = 64; // ERROR: overlap with parameter i3
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -