Engineering Full Stack Apps with Java and JavaScript
Given the following LOCs:
int rate = 10; XXX amount = 1 - rate/100*1 - rate/100;
What can XXX be?
Select 1 option
A. only int or long B. only long or double C. only double D. double or float E. long or double but not int or float. F. int, long, float or double
F
Note that none of the terms in the expression 1 - rate/100*1 - rate/100; is double or float. They are all ints. So the result of the expression will be an int.
Since an int can be assigned to a variable of type int, long, float or double, amount can be int, long, float or double.
Logged in users see lesser ads and get more features.
If you want to solve the questions together with the experts and understand the concepts better, please contact us using the contact form or WhatsApp numbers. Selected people get to do that without any additional charges.