assigning 10 to k, it had the default value. is it okay??
class Test1 {
static int k = 10;
static {
k = 15;
}
public static void main(String[] args) {
System.out.println(k);
}
}
What are you trying to do 🤔
So, this should give 15..
Обсуждают сегодня