[Java] Complete Final Study Guide (Chapters 1-10)

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

The _____ type is used to store numbers with decimal points.

Double

The text that appears alongside a JCheckBox is referred to as the ____.

JCheckBox text

_____ is not a relational operator.

!=

The += operator _____.

*Adds* the value of the right operand to the value of the left operand and stores the result in the left operand.

Java source code files have a ____ extension.

.java

If the variable y contains the value 4, then what value will y contain after the expression y *= 3 is executed?

12

A bug is _____.

A flaw in an application

_____ occurs when the next statement to be executed does not come immediately after the current executing statement.

A transfer of control

A JLabel should be placed _____ the component it identifies.

Above or to the left of

____ was developed under the sponsorship of the US Department of Defense during the 1970s and early 1980s.

Ada

In a do . . . while statement, the loop body _____.

Always executes at least once

A while statement executes _____.

As long as the loop continuation condition is true

____ was developed at Dartmouth College as a language for writing simple programs.

BASIC

The multiplication operator is known as a _____.

Binary operator

The ____ language gained widespread recognition as development language of the UNIX operating system.

C

____ is a programming language originally developed by Microsoft.

C#, Visual Basic.NET, and Visual Basic

____ was developed at Bell Laboratories.

C++

A single Java statement _____.

Can be spread across many lines

Java is _____.

Case sensitive

The ____ is a Windows program that lets you give the computer instructions by typing text at a prompt.

Command Prompt

Two forward slashes (//) begin a(n) _____.

Comment

After stopping at a breakpoint, use the _____ command to resume execution.

Cont

The expression ____ returns the current system times and date.

DateFormat.getDateTime()

Use the _____ class to control how text is formatted.

DecimalFormat

The process of writing to a memory location is said to be _____.

Destructive

In a UML activity diagram, the _____ indicates that a decision is to be made.

Diamond

The clear command _____ in an application.

Displays a list of all the breakpoints

The _____ method converts a String to a double value.

Double.parseDouble

Setting the _____ property of a JTextField to false indicates that the user can not edit the text in the JTextField.

Editable

When a backslash appears in a string of characters, Java combines the next character with a backslash to form a(n) _____.

Escape sequence

_____ are the actions that are performed when the corresponding Java application is run.

Executable statements

____ is a technology for sharing information by using "hyperlinked" text documents.

HTML

Pseudocode _____.

Helps you "think out" an application before attempting to write it, and is convenient and user-friendly.

A(n) _____ is declared within a class but outside any methods.

Instance variable

____ were developed to execute high-level language programs directly without the need for compiling those programs into machine languages

Interpreter programs

A ____ is a window used to display a message to the user or display various options from which the user can choose.

JFrame

Which constant, when passed to method JOptionPane.showMessageDialog, indicates that an error has occurred?

JOptionPane.ERROR_MESSAGE

You can hide information entered by the user with a _____ component, by default an asterisk(*) will be displayed for every charter entered by the user.

JPassword

Setting the horizontalAlignment property of a JTextField to _____ right aligns the text in a JTextField.

JTextField.RIGHT

A _____ begins the body of every class declaration.

Left brace, {

Debuggers allow you to monitor the execution of your applications to locate and remove _____.

Logic errors

_____ do not prevent your application from compiling successfully, but do cause your application to produce erroneous results when it runs.

Logic errors

Use the ____ method to perform exponentiation.

Math.pow

The UML uses diamonds to represent the _____.

Merge and decision symbol

Every variable has a _____.

Name, size and type

_____ test for multiple conditions by placing if... else statements inside other if... else statements.

Nested if... else

____ is a packaging scheme for creating meaningful software units.

Object technology

A(n) _____ occurs when a loop executes for one more or one fewer iteration than in necessary.

Off-by-one error

_____ the variable causes the current value of the variable to be used in the expression in which it appears, after which the value is incremented by 1.

Postincrementing

The expression ++counter is a form of _____.

Preincrement

The task of ordering an application's statements correctly is called _____.

Program control

The _____ property of a JCheckBox holds the value that determines whether a JCheckBox is selected.

Selected

When specifying the value of a JLabel's text property, you should use _____.

Sentence-style capitalization

_____ are also known as a white space.

Spaces, tabs and newlines

The JCheckBox is known as a _____ button.

State

You can set a breakpoint by using the debugger's _____ command.

Stop

Variables allow you to _____.

Store data without using GUI components; store data such as numbers, dates and times; manipulate data without showing the data to the user

The _____ operator combines two string operands into one value.

String-concatenation

____ programming is a disciplined approach to the creation of programs that are clear, correct, and easy to modify.

Structured

_____ occur when code statements violate the grammatical rules of the programming language.

Syntax, compilation or compile-time errors

An algorithm consists of _____.

The actions to be executed, and the order in which they are executed

What is the message dialog icon containing an exclamation point typically used for?

To caution the user against potential problems.

When integer division occurs, the result is _____.

Truncated

Variable declarations must include the variable's _____.

Type

_____ operators are Java operators that only take one operand.

Unary

The ____ is a collection of hardware and software associated with the Internet that allows computer users to locate and view multimedia-based documents on almost any subject.

WWW

The _____ operator is used to ensure that exactly one of two conditions is true.

^

Java statements end with _____.

a semicolon

If the controlling expression in the switch statement is not equal to any of the case labels and there is no default case, _______ occurs

an infinite loop

Objects have ____, such as color, size, and weight.

attributes

_______ separates the case label from the code that will execute matches the controlling expression.

break keyword

Java programs consist of pieces called ____, which are used to define objects.

classes

A(n) ____ is a device capable of performing computations and making logical decisions.

computer

The expression in the parentheses following the switch keyword is called a _____

controlling expression

The correct syntax for a default case is _______

default case:

The format method of class DecimalFormat takes a _____ and returns a _____ that contains formatted values.

double, String

to prevent a user from modifying text in a JPasswordfield set its ________

editable

The JOptionPane dialog icon typically used to caution the user against potential problems is the ____.

exclamation point

Which of the following is a syntax error?

failing to end a case with the break statement

What element of counter-controlled repetition determines when the loop should end?

final value

____ is a nonvolatile storage device, retaining information even when the computer is turned off

floppy disk and DVD

Which of the following is the appropriate for header to vary the control variable over the following sequence of values: 2, 4, 6, 8, 10?

for(int i = 2; i <= 10; i += 2)

A(n) _____ statement is an example of a Java selection statement.

if, switch and if... else

An example of a double-selection statement is the _____ statement.

if... else

The last expression in a for statement header specifies the ____.

increment

The ____ primitive type is not compatible with a switch statement.

int

After you have created a .class file, use the _____ command to run your application.

java

The command ____, followed by the name of the application's .class file, executes the application.

java

The _____ command will compile the Java source code file and create a .class file in the directory.

javac

The _____ event handler is called any time a key is pressed in a JTextField.

keyPressed

The second expression in a for statement header specifies the ____.

loop-continuation condition

Machine languages are ____, which means that a particular machine language can be used on only one type of CPU

machine dependent

The third argument in the constructor of a SpinnerNumberModel specifies the ____.

maximum value in the range

The ____ retains information that has been entered through input devices.

memory unit

Java is fully ____.

object-oriented

Operator && ____.

performs short-circuit evaluation

Call JButton's _____ method to set the focus to the JButton.

requestFocusInWindow

Use the _____ method to specify the size and location of a JLabel.

setBounds

The programs that run on a computer are referred to as ____.

software

A JCheckBox is selected when its isSelected method returns ____.

true

The control variable's ____ is NOT one of the four essential elements of counter-controlled repetition.

type

A for loop with the header for ( int x = 5; x <= 2; x++ ) will execute the for body ____ time(s).

zero

The _____ operator is used to ensure that at least one of two conditions is true.

||

The _____ signifies the end of a switch statement.

} character


संबंधित स्टडी सेट्स

Chapter 19 Accounting for Income Tax

View Set

Types of Life Insurance Policies

View Set

Chapter 19: Normal Newborn: Processes of Adaptation

View Set

Chapter 1: Introduction to Information Technology— Hardware, Software, and Telecommunications

View Set