Welcome Guest | Sign in | Register
Variables and Loops - Discussion Page For Q.2990 | Java Programming Questions and Answers | Java Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Variables and Loops > Questions and Answers

Q: public class UnaryOperator {
public static void main(String[] args) {
byte a=-5;
int b=-5;
int c=~a+(byte)~b;
System.out.print(c);
}
}

What will output when you compile and run the above code?
A. 0 B. 8
C. Run time exception D. Compiler error

Answer and Explanation

Answer:8

Explanation:
There is no explanation...

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.