Junior
121
Что вернет этот код
Companies where asked:
IBS
Task condition
public class ATest {
String global = "111";
public int parse(String arg) {
int value = 0;
try {
String global = arg; // Shadowing the instance variable
value = Integer.parseInt(global); // Parsing the local variable
} catch (Exception e) {
System.out.println(e.getClass()); // Print exception class
}
System.out.print(this.global + " " + value + " "); // Accessing instance variable using 'this'
return value;
}
public static void main(String[] args) {
ATest ct = new ATest();
System.out.print(ct.parse("333")); // Calling parse method
}
}