Welcome Guest | Sign in | Register
Variables and Loops - Discussion Page For Q.2993 | 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 Identifier {
public static void main(String[] args) {
double strictfp=5.02;
strictfp+=.333;
System.out.print(strictfp);
}
}
A. 5.353 B. 5.353D
C. 5.353d D. Compiler error

Answer and Explanation

Answer:Compiler error

Explanation:
    In java programming language variable name includes alphabet, digits few special characters like underscore (_), dollar singe ($) but it should not be any reserved word of java language. Here strictfp is keyword of java cannot be name of variable

Comment on this Question

Name:

Loading...




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