Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
82 views4 pages

Computer Programming Quiz 3

The document is a short quiz containing multiple choice and true/false questions about Java programming concepts like variables, operators, comments, and errors. It contains the answers to 10 questions about code snippets evaluating expressions and identifying errors, comments, keywords, and output.

Uploaded by

Cristel10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views4 pages

Computer Programming Quiz 3

The document is a short quiz containing multiple choice and true/false questions about Java programming concepts like variables, operators, comments, and errors. It contains the answers to 10 questions about code snippets evaluating expressions and identifying errors, comments, keywords, and output.

Uploaded by

Cristel10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

SHORT QUIZ

Question text
Read each statement carefully and decide whether it’s TRUE or FALSE.
The last line of code, with a close brace { symbol, is properly indented.
Select one:
False

Question text
True or False: Brackets [] are also separators used in declaring arrays.
Answer:
True

Question text
Refer to the block of codes below. Read each statement carefully and decide
whether it’s TRUE or FALSE.
There is an error in line 9.
Answer:
TRUE

Question text
True or False: Operators, in Java programming language, use special symbols
to call methods and their objects.
Answer:
False

Question text
Read each statement carefully and decide whether it’s TRUE or FALSE.
There are no errors in the program.
Select one:
False

Question text
Refer to the block of codes below. Read each statement carefully and decide
whether it’s TRUE or FALSE.
Line 9 uses a traditional comment which uses double forward slash.
Answer: False

Question text
True or False: Many programmers can be literate with Java programming
language for it is intended to be that way.
Answer:
True

Question text
True or False: You’ll know there’s an error if you see a red circle with an
exclamation point in Netbeans IDE.
Answer:
True

Question text
Observe the following statements and decide whether the variable result’s value
is TRUE or FALSE.
Given that:
int x = -77;
int z = 43;
result = (z < x && 1 != 10) ? true : false;
result = (x = 100) >= z;
Select one:
True

The file is accurately named – Students.java.


-false

There are three (3) separators found in line 13.


-FALSE

There is an error in line 9.


-True

result = 90 < x || -1 < z;


-True

The last line of code, with a close brace { symbol, is properly indented.
-False

Assuming there are no errors in the code, line 13 would display When I
graduate, I’d be 18.
-True

Figure 2 shows the Netbeans Integrated Development Environment.


-True

The last line of code will output 100.0.


-True
True or False: An exclamation point in Java means NOT. Therefore, != means
not equal to.
-True

There are two types of comments used in the program above – end of line and
Javadoc comments.
-True

result = (z < x && 1 != 10) ? true : false;


-False

There are keywords found in line 7.


-True

In line 11, the value of personage is 18.


-TRUE

If there are no errors in the program, the first line of output would read Hi, I’m
a normal person.
-False

result = (x * z + (z += 7)) >= 100;


-False

True or False: Logical OR operator will result to false if one of the expressions
is false.
-False

You might also like