Welcome Guest | Sign in | Register
Variables and Loops - Discussion Page For Q.2994 | 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 TypeConversion {
public static void main(String[] args) {
float f1=11;
float f2=11.f;
f2=f1+f2;
System.out.println(f2);
}
}

What will output when you compile and run the above code?
A. 22 B. 22.0
C. 22.0f D. Compiler error

Answer and Explanation

Answer:22.0

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.