Welcome Guest | Sign in | Register
Language Fundamentals - Discussion Page For Q.3012 | Java Programming Questions and Answers | Java Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Language Fundamentals > Questions and Answers

Q: Identify the valid assignments.

1. float f = \u0038;
2. long L2 = 2L;
3. float f = 1.2;
4. char c = '/u004E';
5. byte b = 100;
A. 2,3,4 B. 1,2,3,4
C. 4,5 D. 1,2,5

Answer and Explanation

Answer:1,2,5

Explanation:
1 is correct because \u0038 is unicode for nbr 8.
3 is wrong because 1.2 is a double literal.
4. is a little sneaky perhaps. The
unicode escape character is incorrect

Comment on this Question

Name:

Loading...




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