Given a sample code:
1 public class Test {
2 public static void main(String[] args) {
3 Number i=10;
4 int j = 10;
5 if (i.equals(j))
6 {
7 System.out.println("equals");
8 }
9 else
10 System.out.println("not equals");
}
}
What will be the result of above code ?
(1) not equal
(2) equal
(3) Compile time error at line no 3.
(4) Compile time error at line no 5.
(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.