Docsity

STARTING OUT WITH JAVA FROM CONTROL STRUCTURES THROUGH DATA STRUCTURES QUESTION BANK WITH, Exams of Object Oriented Programming

Toggle sidebar
bg1
STARTING OUT WITH JAVA FROM CONTROL STRUCTURES
THROUGH DATA STRUCTURES QUESTION BANK WITH FULL
SOLUTIONS
Question 1.
Syntax.
Answer: These are rules that must be followed when writing a program
Question 2.
Variables.
Answer: Symbolic names made up by the programmer that represents location
in the computer's RAM
Question 3.
Byte Code.
Answer: Instructions are read and interpreted by the JVM
Question 4.
Software.
Answer: Refers to programs
Question 5.
Central Processing Unit (CPU).
Answer: Consists of two parts the control unit and the arithmetic and logic unit
(ALU)
Question 6.
RAM.
Answer: Is usually a volatile type of memory, used only for temporary storage
Question 7.
Application Software.
Answer: Is a programs that make the computer useful to the user
Question 8.
Key Words.
Answer: Words that have a special meaning in the programming language
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download STARTING OUT WITH JAVA FROM CONTROL STRUCTURES THROUGH DATA STRUCTURES QUESTION BANK WITH and more Exams Object Oriented Programming in PDF only on Docsity!

STARTING OUT WITH JAVA FROM CONTROL STRUCTURES

THROUGH DATA STRUCTURES QUESTION BANK WITH FULL

SOLUTIONS

Question 1.

Syntax.

Answer: These are rules that must be followed when writing a program

Question 2.

Variables.

Answer: Symbolic names made up by the programmer that represents location in the computer's RAM

Question 3.

Byte Code.

Answer: Instructions are read and interpreted by the JVM

Question 4.

Software.

Answer: Refers to programs

Question 5.

Central Processing Unit (CPU).

Answer: Consists of two parts the control unit and the arithmetic and logic unit (ALU)

Question 6.

RAM.

Answer: Is usually a volatile type of memory, used only for temporary storage

Question 7.

Application Software.

Answer: Is a programs that make the computer useful to the user

Question 8.

Key Words.

Answer: Words that have a special meaning in the programming language

Semicolons.

Answer: Are used to indicate the end of a Java statement

Question 10.

Logical Errors.

Answer: Are mistakes that cause the program to produce erroneous results

Question 11.

Literals.

Answer: Is a value that is written into the code of a program

Question 12.

String.

Answer: Is not a primitive data type

Question 13.

Character Literals.

Answer: Are enclosed in single quotes

Question 14.

String Literals.

Answer: Are enclosed in double quotes

Question 15.

Scanner Class Method.

Answer: Reads a string by nextLine

Question 16.

Java Application Program.

Answer: Must have a method named main

Question 17.

Data Type.

Answer: Is the type of data that the variable can hold

Answer: Tests a series of conditions. It is often simpler to test a series of conditions with the if-else-if statement than with a set of nested if-else statements

Question 27.

Nested if statement.

Answer: To test more than one condition, an if statement can be nested inside another if statement

Question 28.

If-else statement.

Answer: It will execute one group of statements if its boolean expression is true, or another group if its boolean expression if false

Question 29.

JOptionPane.

Answer: Is a class that allows you to quickly display a dialog box, which is a small graphical window displaying a message or requesting input

Question 30.

Scanner.

Answer: A class can be used to read input form the keyboard

Question 31.

final Keyword.

Answer: Can be used in a variable declaration to make the variable a named constant

Question 32.

Argument.

Answer: Is to be displayed on the screen is placed inside the parentheses

Question 33.

print and println.

Answer: Used to display text output

Question 34.

Java Virtual Machine (JVM).

Answer: Is a program that reads Java byte code instructions and executes them as they are read

Question 35.

Syntax Errors.

Answer: Are mistakes that the programmer has made that violate the rules of the programming language

Question 36.

Compiler.

Answer: A program that translates source code into an executable form

Question 37.

Source Files.

Answer: Where source files are saved. Java source file end with the .java extension

Question 38.

Source Code.

Answer: The Java programming statements written by the programmer

Question 39.

Programming Language.

Answer: Is a special language used to write computer programs

Question 40.

\n.

Answer: Newline

Question 41.

\t.

Answer: Horizontal Tab

Question 42.

\b.

Answer: Backspace

Answer: Addition

Question 53.

Answer: Subtraction

Question 54.

Answer: Multiplication

Question 55.

Answer: Division

Question 56.

Answer: Modulus

Question 57.

Answer: Greater than

Question 58.

Answer: Less than

Question 59.

Answer: Greater than or equal to

Question 60.

Answer: Less than or equal to

Answer: Equal to

Question 62.

Answer: Not equal to

Question 63.

Answer: AND

Question 64.

Answer: OR

Question 65.

Answer: NOT

Question 66.

Is x greater than y AND is a less than b?

Answer: x > y && a < b.

Question 67.

Is x equal to y OR is x equal to z?

Answer: x == y || x == z.

Question 68.

Is the expression x > y NOT true?

Answer: !(x > y).

Question 69.

!true.

Answer: false