2023-10-23 16:44:12 +02:00
|
|
|
import java.lang.Integer;
|
|
|
|
|
2023-10-24 15:17:13 +02:00
|
|
|
class Other {
|
|
|
|
static field = 20;
|
|
|
|
}
|
|
|
|
|
2023-10-23 16:44:12 +02:00
|
|
|
public class Static {
|
|
|
|
static i = 20;
|
|
|
|
|
2023-10-24 12:05:19 +02:00
|
|
|
static {
|
|
|
|
var x = 30;
|
|
|
|
i = x;
|
|
|
|
}
|
|
|
|
|
2024-03-14 13:50:56 +01:00
|
|
|
public static m() {
|
2023-10-24 15:17:13 +02:00
|
|
|
return i + Other.field;
|
2023-10-23 16:44:12 +02:00
|
|
|
}
|
|
|
|
}
|