11
Loading subject content…
Loading subject content…
Loading practice questions…
What is the output of the following program?
class Main {
static String f(int x) { return "int"; }
static String f(long x) { return "long"; }
static String f(Integer x) { return "Integer"; }
public static void main(String[] args) { System.out.println(f(5)); }
}What is the output of the following program?
class Main {
static void change(int v) { v = 100; }
public static void main(String[] args) {
int n = 1;
change(n);
System.out.println(n);
}
}