Java
What lines ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
What lines will
not
cause a compilation error?
float f = 1.01;
float f = 1/3;
int i = 1/3;
double d = 999d;
Explanation
There will be a compilation error in the line
float f = 1.01;
since the constant 1.01 is of type double by default, and does not lead to float type automatically
type-conversion
floating-point
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
Related Content
As a result of compiling of which lines there will be a compilation error: ...
What will the following code display (ASCII code of '1' is 49)? ...
What will be the result of the following code execution? ...
Which line/lines will compilation error occur in? publi...
What is the result of the following code execution? pub...
J
ava
Quiz
Login to learn Java
or
Read more about
Java Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
Java quizzes
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
int i = Integer.MAX_VALUE + 10; What is th...
What happens after the following code is compiled and run: ...
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment