4. class Test
{
public static void main(String[] args)
{
Integer i=254;
byte b=(byte)(int)i;
System.out.println(b);
}
}
what is the output of above program?
A. compile time error
B. Run time error
C. -2
D. 254
E. -1
Correct Answer: C
45. Given: 1. public class A { 2. public void doit() { 3. } 4. public String doit() { 5. return "a"; 6. } 7. ...
No comments:
Post a Comment