Friday, September 4, 2009

SCJP Questions

Given:
1 public class test (
2 public static void main (String args[]) {
3 int i = 0xFFFFFFF1;
4 int j = ~i;
5
6 }
7 )
What is the decimal value of j at line 5?
A. 0
B. 1
C. 14
D. -15
E. An error at line 3 causes compilation to fail.
F. An error at line 4 causes compilation to fail.

Answer: C

0 comments:

Post a Comment

 

About

Site Info

Information Source

Academy of JAVA by Rajesh Rolen Copyright © 2009 Community is Developed by Rajesh Kumar Rolen WebSite

/* tracking code by yahoo login */