Question:
Questions for Java Programming will award?
?
2016-10-08 15:23:54 UTC
6. Which of the following is true?
a) = is a comparison operator. == is an assignment operator.
b) = and == can be used interchangeably.
c) = is an assignment operator. == is a comparison operator.
d) = is only used with numeric values. == is only used with boolean values. ***




7. What are the two boolean literal values in Java?
a) true and false ***
b) 0 and 1
c) True and False
d) t and f

8) and is true about if-else statements?
a) The if-else sttatement provides two blocks of code that will both be executed if its boolean expression is true.
b) the if-else statement truest its expression again if its boolean expression is false.
c) the if-else statement is similar to the if statement in that it only executes code if its boolean expression is true.
d) The if-else statement provides a way to execute code in case its boolean expression is false. ***

9. If x is an int variable, which of the following contains invalid Java code?
if (x<5) x++;
if (x<5) { x++; }
if x<5 x++; ***
if (x<5) if (x>0) x++;
Three answers:
Velocity
2016-10-08 16:15:18 UTC
6 is c

7 is a

8 is d

9 is c
2016-10-08 16:17:35 UTC
6 is b String cat = "cat"; there used a = for non numerical value.

7 is a

8 is d

9 is a



Your grade not mine. But i enjoy playing darts so gave me a reason to use the dart board. Do some more research on 6 and 9.... but not together
Andrew
2016-10-08 15:26:08 UTC
Not sure


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Continue reading on narkive:
Loading...