Given a sample code:
1 public class Test3 {
2 static void pass(int i) {
}
3 static void pass(Integer i) {
4 System.out.println(i);
}
5 public static void main(String[] args) {
6 pass(1);
}
}
What will be the result of above code ?
(1) 1
(2) Print nothing
(3) Compile time error at line no 2.
(4) Compile time error at line no 6.
(2)
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.