Welcome To Java Quiz

Test your knowledge in Java fundamentals

1.You need to reference a value stored in an array named B in row 7 column 3. Which syntax is correct within Java for finding the value of this variable?

B[3,7]
B[7,3]
B[3][7]
B[7][3]

2.According to Boolean operations, if !g is true, then which of the following applies?

A.If g is true, and true otherwise
B.If g is true, and false otherwise
C.If g is false, and false otherwise
D.If g is false, and true otherwise

You are having a problem with the “if” logic in your code and need to utilize case conditions to create a number of possible execution paths. Which statement is necessary to accomplish this?

A.swap
B.task
C.instance
D.switch

4. There are numerous ways of adding comments to code written in Java. Which of the following are accepted methods of signifying the beginning of comments within Java? (Choose all that apply)

A. //,/**,/*
B.#
C./#

D.*

5.Within Java, you need to code your program so that under certain conditions it will skip the current iteration of a for loop. What can be used to accomplish this?

A.jump
B.break
C. continue
D. skip


Back To Home