1,412
16
Essay, 13 pages (3000 words)

Java and correct answer essay

Chapter 2 Practice Quiz * Grade for: Chapter02-23 A variable’s scope is the part of the program that has access to the variable. | | Student Response| Value| Correct Answer| not answered | 0% | True| | * Grade for: Chapter02-19 Named constants are initialized with a value, that value cannot be changed during the execution of the program. | | Student Response| Value| Correct Answer| not answered | 0% | True| | * Grade for: Chapter02-50 Programming style includes techniques for consistently putting spaces and indentation in a program so visual cues are created. | | Student Response| Value| Correct Answer| ot answered | 0% | True| | * Grade for: Chapter02-27 In Java the variable named One is the same as the variable named ONE. | | Student Response| Value| Correct Answer| not answered | 0% | False| | * Grade for: Chapter02-38 Variables of the boolean data type are useful for | | | Student Response| Value| Correct Answer| Feedback| A. | working with small integers| |   |  | B. | evaluating true/false conditions| |   |  | C. | working with very large integers| |   |  | D. | evaluating scientific notation| |   |  | | * Grade for: Chapter02-35 The primitive data types only allow a(n) ________ to hold a single value. | | Student Response| Value| Correct Answer| Feedback| A. | variable| |   |  | B. | object| |   |  | C. | class| |   |  | D. | literal| |   |  | | * Grade for: Chapter02-42 To convert from one data type to another you must use casting | | | Student Response| Value| Correct Answer| Feedback| A. | when you are converting from a lower-ranked value to a higher-ranked value| |   |  | B. | when you are converting from a higher-ranked value to a lower-ranked value| |   |  | C. | always| |   |  | D. | never| |   | | | * Grade for: Chapter02-36 If x has been declared an integer, int x;, which of the following is invalid? | | Student Response| Value| Correct Answer| Feedback| A. | x = 0;| |   |  | B. | x = -58932;| |   |  | C. | x = 1, 000;| |   |  | D. | x = 592;| |   |  | | Score:| 0%| | * Grade for: Chapter02-26 When saving a Java source file, save it with an extension of | | | Student Response| Value| Correct Answer| Feedback| A. | . javac| |   |  | B. | . class| |   |  | C. | . src| |   |  | D. | . java| |   |  | | * Grade for: Chapter02-10 Which of the following is not a primitive data type? | | | Student Response| Value| Correct Answer| Feedback| A. | short| |   |  | B. | long| |   |  | C. | float| |   |  | D. | String| |   |  | * Grade for: Chapter02-49 Which of the following is not a valid comment in Java? | | | Student Response| Value| Correct Answer| Feedback| A. | Single line comments, two forward slashes – //| |   |  | B. | Multi-line comments, start with /* and end with */| |   |  | C. | Multi-line comments, start with */ and end with /*| |   |  | D. | Documentation comments, any comments starting with /**| |   |  | | * Grade for: Chapter02-17 Which of the following will correctly convert the data type, if x is an integer and y is a double? | | | Student Response| Value| Correct Answer| Feedback| A. | | |   |  | B. x = int y;| |   |  | C. | x = (int)y;| |   |  | D. | x = y;| |   | | | * Grade for: Chapter02-24 What will be displayed as a result of executing the following code? | | | Student Response| Value| Correct Answer| Feedback| A. | 9 45 16| |   |  | B. | 94516| |   |  | C. | 9 45 16| |   |  | D. | Nothing, this is an error| |   |  | | * Grade for: Chapter02-16 What is the result of the following statement? 25/4 + 4 * 10 % 3 | | | Student Response| Value| Correct Answer| Feedback| A. | 19| |   |  | B. | 5. 25| |   |  | C. | 3| |   |  | D. | 7| |   |  | | If the following Java statements are executed, what will be displayed? Student Response| Value| Correct Answer| Feedback| A. | The top three winners are Jody, the Giant Buffy, the Dwarf Adelle, the Albino| |   |  | B. | The top three winners are Jody, the GiantBuffy, the DwarfAdelle, the Albino| |   |  | C. | The top three winners are Jody, the GiantBuffy, the DwarfAdelle, and the Albino| |   |  | D. | The top three winners are Jody, the Giant Buffy, the DwarfAdelle, the Albino| |   |  | * Grade for: Chapter02-31 A(n) ________ is a named storage location in the computer’s memory. | | | Student Response| Value| Correct Answer| Feedback| A. | literal| |   |  | B. constant| |   |  | C. | variable| |   |  | D. | operator| |   |  | | * Grade for: Chapter02-32 What would be displayed as a result of the following code, assuming x has been declared an integer? | | | Student Response| Value| Correct Answer| Feedback| A. | There are 583 hens in the hen house. | |   |  | B. | There are 5785 hens in the hen house. | |   |  | C. | There are x5hens in the hen house. | |   |  | D. | There are 5785 hens in the hen house. | |   |  | | * Grade for: Chapter02-07 What would be printed out as a result of the following code? | | | Student Response| Value| Correct Answer| Feedback| A. The quick brown fox jumped over theslow moving hen. | |   |  | B. | The quick brown fox jumped over the slow moving hen. | |   |  | C. | The quick brown fox jumped over the slow moving hen. | |   |  | D. | Nothing. This is an error. | |   |  | | * Grade for: Chapter02-47 What will be displayed as a result of executing the following code? | | | Student Response| Value| Correct Answer| Feedback| A. | I am enjoying java. I AM ENJOYING JAVA. i am enjoying java. Character at index x = j msg has 20 characters. | |   |  | B. | I am enjoying java. I AM ENJOYING JAVA. i am enjoying java. Character at index x = o sg has 20 characters. | |   |  | C. | I am enjoying java. I AM ENJOYING JAVA. i am enjoying java. Character at index x = y msg has 19 characters. | |   |  | D. | I am enjoying java. I AM ENJOYING JAVA. i am enjoying java. Character at index x = o msg has 19 characters. | |   |  | | * Grade for: Chapter02-29 To print “ Hello, world” on the monitor, use the following Java statement | | | Student Response| Value| Correct Answer| Feedback| A. | SystemOutPrintln(“ Hello, world”);| |   |  | B. | System. out. println{“ Hello, world”}| |   |  | C. | System. Out. println(“ Hello, world”);| |   |  | D. Print(“ Hello, world”);| |   |  | | * Grade for: Chapter02-06 A(n) ________ is a value that is written into the code of a program. | | | Student Response| Value| Correct Answer| Feedback| A. | literal| |   |  | B. | assignment statement| |   |  | C. | variable| |   |  | D. | operator| |   |  | | * Grade for: Chapter02-08 Which of the following is not a rule that must be followed when naming identifiers? | | | Student Response| Value| Correct Answer| Feedback| A. | The first character must be one of the letters a-z, A-Z, and underscore or a dollar sign. | |   |  | B. | Identifiers can contain spaces. | |   |  | C. Uppercase and lowercase characters are distinct. | |   |  | D. | After the first character, you may use the letters a-z, A-Z, the underscore, a dollar sign, or digits 0-9. | |   |  | | * Grade for: Chapter02-18 What will be displayed as a result of executing the following code? | | | Student Response| Value| Correct Answer| Feedback| A. | x = 5, y = 20| |   |  | B. | x = 25, y = 4| |   |  | C. | x = 100, y = 0| |   |  | D. | x = 100, y = 20| |   |  | | Score:| 0%| | * Grade for: Chapter02-01 To compile a program named, First, use the following command | | | Student Response| Value| Correct Answer| Feedback| A. java-source 1. 5 First. java| |   |  | B. | javac-source 1. 5 First| |   |  | C. | javac First. java| |   |  | D. | compile First. javac| |   |  | | * Grade for: Chapter02-14 Character literals are enclosed in ________; string literals are enclosed in ________. | | | Student Response| Value| Correct Answer| Feedback| A. | single quotes; single quotes| |   |  | B. | double quotes; double quotes| |   |  | C. | single quotes; double quotes| |   |  | D. | double quotes; single quotes| |   |  | | * Grade for: Chapter02-12 Assuming that pay has been declared a double, double pay, the following statement is valid. ay = 2, 583. 44; | | Student Response| Value| Correct Answer| not answered | 0% | False| | * Grade for: Chapter02-09 Although the dollar sign, $, is a legal identifier character, you should not use it because it is normally used for special purposes. | | Student Response| Value| Correct Answer| not answered | 0% | True| | * Grade for: Chapter02-03 All Java lines of code end with semicolons. | | Student Response| Value| Correct Answer| not answered | 0% | False| | * Grade for: Chapter02-25 Which of the following is not a valid comment statement? | | | Student Response| Value| Correct Answer| Feedback| A. | | |   |  |

B. | | |   |  | C. | | |   |  | D. | | |   | | | * Grade for: Chapter02-13 The boolean data type may contain values in the following range of values | | | Student Response| Value| Correct Answer| Feedback| A. | True/False| |   |  | B. | -128 to +127| |   |  | C. | -2, 147, 483, 648 to +2, 147, 483, 647| |   |  | D. | -32, 768 to +32, 767| | | | | * Grade for: Chapter02-02 A Java program must have at least one | | | Student Response| Value| Correct Answer| Feedback| A. | Class definition| |   |  | B. | Variable| |   |  | C. | Comment| |   |  | D. | System. out. println(); statement| |   |  | | * Grade for: Chapter02-45

What will be displayed after the following statements have been executed? | | | Student Response| Value| Correct Answer| Feedback| A. | x = 54. 3| |   |  | B. | x| |   |  | C. | x = 108. 6| |   |  | D. | Nothing, this is an error. | |   |  | | * Grade for: Chapter02-20 What will be the displayed when the following code is executed? | | | Student Response| Value| Correct Answer| Feedback| A. | x = 22, y = 4| |   |  | B. | x = 22, y = 26| |   |  | C. | x = 22, y = 88| |   |  | D. | Nothing, this is an error| |   |  | | * Grade for: Chapter02-21 In the following Java statement what is the value of the variable, name?

String name = “ John Doe”; | | | Student Response| Value| Correct Answer| Feedback| A. | John Doe| |   |  | B. | The memory address where “ John Doe” is located| |   |  | C. | name| |   |  | D. | The memory address where name is located| |   |  | | * Grade for: Chapter02-40 What is the result of the following statement? 25 – 7 * 3 + 12/3 | | | Student Response| Value| Correct Answer| Feedback| A. | 6| |   |  | B. | 8| |   |  | C. | 10| |   |  | D. | 12| |   |  | | * Grade for: Chapter02-44 A (n)________ is a variable whose content is read only and cannot be changed during the program’s execution of the program. | | Student Response| Value| Correct Answer| Feedback| A. | operator| |   |  | B. | literal| |   |  | C. | named constant| |   |  | D. | reserved word| |   |  | | * Grade for: Chapter02-04 The ________ is normally considered the standard output and standard input devices, and usually refer to the monitor and keyboard. | | | Student Response| Value| Correct Answer| Feedback| A. | CRT| |   |  | B. | CPU| |   |  | C. | secondary storage devices| |   |  | D. | console| |   |  | | * Grade for: Chapter02-11 Which of the following is valid? | | | Student Response| Value| Correct Answer| Feedback| A. | float y; y = 54. 9;| |   |  |

B. | float y; double z; z = 934. 21; y = z;| |   |  | C. | float w; w = 1. 0f;| |   |  | D. | double v; v = 1. 0f;| |   |  | | * Grade for: Chapter02-22 What will be displayed as a result of executing the following code? | | | Student Response| Value| Correct Answer| Feedback| A. | I am enjoying this class. | |   |  | B. | I am enjoying this class. | |   |  | C. | I am enjoying this class. | |   |  | D. | I am enjoying this class. | | | | | * Grade for: Chapter02-39 Both character literals and string literals can be assigned to a char variable. | | Student Response| Value| Correct Answer| not answered | 0% | False| | Grade for: Chapter02-04 The ________ is normally considered the standard output and standard input devices, and usually refer to the monitor and keyboard. | | | Student Response| Value| Correct Answer| Feedback| A. | CRT| |   |  | B. | CPU| |   |  | C. | secondary storage devices| |   |  | D. | console| |   |  | | * Grade for: Chapter02-41 What is the result of the following statement? 17 % 3 * 2 – 12 + 15 | | | Student Response| Value| Correct Answer| Feedback| A. | 7| |   |  | B. | 8| |   |  | C. | 12| |   |  | D. | 105| |   |  | | * Grade for: Chapter02-22 What will be displayed as a result of executing the following code? | | Student Response| Value| Correct Answer| Feedback| A. | I am enjoying this class. | |   |  | B. | I am enjoying this class. | |   |  | C. | I am enjoying this class. | |   |  | D. | I am enjoying this class. | |   |  | | * Grade for: Chapter02-37 Given double r;, which of the following is invalid? | | | Student Response| Value| Correct Answer| Feedback| A. | r = 326. 75;| |   |  | B. | r = 9. 4632e15;| |   |  | C. | r = 9. 4632E15;| |   |  | D. | r = 2. 9X106;| |   |  | | * Grade for: Chapter02-13 The boolean data type may contain values in the following range of values | | Student Response| Value| Correct Answer| Feedback| A. | True/False| |   |  | B. | -128 to +127| |   |  | C. | -2, 147, 483, 648 to +2, 147, 483, 647| |   |  | D. | -32, 768 to +32, 767| |   | | | * Grade for: Chapter02-43 What will be displayed after the following statements have been executed? | | | Student Response| Value| Correct Answer| Feedback| A. | x = 15, y = 20, z = 32| |   |  | B. | x = 35, y = 52, z = 48| |   |  | C. | x = 300, y = -12, z = 2| |   |  | D. | x = 300, y = -12, z = 0| |   |  | | * Grade for: Chapter02-26 When saving a Java source file, save it with an extension of | | Student Response| Value| Correct Answer| Feedback| A. | . javac| |   |  | B. | . class| |   |  | C. | . src| |   |  | D. | . java| |   |  | | * Grade for: Chapter02-05 If the following Java statements are executed, what will be displayed? | | | Student Response| Value| Correct Answer| Feedback| A. | The top three winners are Jody, the Giant Buffy, the Dwarf Adelle, the Albino| |   |  | B. | The top three winners are Jody, the GiantBuffy, the DwarfAdelle, the Albino| |   |  | C. | The top three winners are Jody, the GiantBuffy, the DwarfAdelle, and the Albino| |   |  | D. The top three winners are Jody, the Giant Buffy, the DwarfAdelle, the Albino| |   | | | * Grade for: Chapter02-03 All Java lines of code end with semicolons. | | Student Response| Value| Correct Answer| not answered | 0% | False| | * Grade for: Chapter02-48 If the compiler encounters a statement that uses a variable before the variable is declared, an error will result. | | Student Response| Value| Correct Answer| not answered | 0% | True| | * Grade for: Chapter02-30 To display the output on the next line, you can use the println method or use the escape sequence, ________, in the print method. | | Student Response| Value| Correct Answer| Feedback| A. || |   |  | B. || |   |  | C. | | |   |  | D. | | |   | | | * Grade for: Chapter02-28 Every Java application program must have | | | Student Response| Value| Correct Answer| Feedback| A. | a class named MAIN| |   |  | B. | a method named main| |   |  | C. | comments| |   |  | D. | integer variables| |   |  | | * Grade for: Chapter02-34 Variables are classified according to their ________. | | | Student Response| Value| Correct Answer| Feedback| A. | value| |   |  | B. | data type| |   |  | C. | names| |   |  | D. | location in the program| |   | | * Grade for: Chapter02-15 What is the result of the following statement? 10 + 5 * 3 – 20 | | | Student Response| Value| Correct Answer| Feedback| A. | -5| |   |  | B. | 5| |   |  | C. | 25| |   |  | D. | -50| |   |  | | * Grade for: Chapter02-46 Which of the following is a valid Java statement? | | | A. | String str = ‘ John Doe’;| |   |  | B. | string str = “ John Doe”;| |   |  | C. | string str = “ John Doe”;| |   |  | D. | String str = “ John Doe”;| |   |  | | * Grade for: Chapter02-33 Identifiers and class names are examples of variables. | | Student Response| Value| Correct Answer| not answered | 0% | False| |

Thank's for Your Vote!
Java and correct answer essay. Page 1
Java and correct answer essay. Page 2
Java and correct answer essay. Page 3
Java and correct answer essay. Page 4
Java and correct answer essay. Page 5
Java and correct answer essay. Page 6
Java and correct answer essay. Page 7
Java and correct answer essay. Page 8
Java and correct answer essay. Page 9

This work, titled "Java and correct answer essay" was written and willingly shared by a fellow student. This sample can be utilized as a research and reference resource to aid in the writing of your own work. Any use of the work that does not include an appropriate citation is banned.

If you are the owner of this work and don’t want it to be published on AssignBuster, request its removal.

Request Removal
Cite this Essay

References

AssignBuster. (2022) 'Java and correct answer essay'. 1 August.

Reference

AssignBuster. (2022, August 1). Java and correct answer essay. Retrieved from https://assignbuster.com/java-and-correct-answer-essay/

References

AssignBuster. 2022. "Java and correct answer essay." August 1, 2022. https://assignbuster.com/java-and-correct-answer-essay/.

1. AssignBuster. "Java and correct answer essay." August 1, 2022. https://assignbuster.com/java-and-correct-answer-essay/.


Bibliography


AssignBuster. "Java and correct answer essay." August 1, 2022. https://assignbuster.com/java-and-correct-answer-essay/.

Work Cited

"Java and correct answer essay." AssignBuster, 1 Aug. 2022, assignbuster.com/java-and-correct-answer-essay/.

Get in Touch

Please, let us know if you have any ideas on improving Java and correct answer essay, or our service. We will be happy to hear what you think: [email protected]