(Java Programming 1) Mid-term Study Guide: Chapters 1-3 Tests

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

A(n) ________ defines the circumstances under which a class can be accessed and the other classes that have the right to use a class.

Access specifier.

Within any class or method, the code between a pair of curly braces is called a(n) ____.

Block.

You use the _______ data type to hold any single character.

Char.

If you receive an error that states, "Exception in threat 'main' java.lang.NoClassDefFoundError," when you try to execute the application, you probably do not have your ______ set correctly.

Class path.

A _______ data type can hold 14 or 15 significant digits of accuracy.

Double.

__________ refers to the hiding of data and methods within an object.

Encapsulation.

A Java identifier can contain only letters, digits, ampersands, or number signs. (TRUE or FALSE)

False.

If you give the same name to a class's instance field and to a local method variable, the instance variable overrides the method's local variable. (TRUE or FALSE)

False.

Using the void keyword in the main() method header indicates that a valuue will be returned by the main() method is called. (TRUE or FALSE)

False.

When you multiply an int and a double, the result is the int. (TRUE or FALSE)

False.

public class First {public static void main(String[] args) {System.out.println("First Java application"); } } Given the above code, which item identifies the name of the class?

First.

Java contains a class named ______ that allows you to produce dialog boxes.

JOptionPane.

When you properly ____ a method, you can call it providing different argument lists, and the appropriate version of the method executes.

Overload.

_________ are also called modules, methods, functions, and subroutines. Java programmers most frequently use the term "method".

Procedures.

The percent sign is the ________ operator.

Remainder.

A data item's _______ is the area in which it is visible to a program and in which you can refer to it using its simple identifier.

Scope.

In Java, the reserved keyword _______ means that a method is accessible and usable even though no objects of the class exist.

Static.

public class First {public static void main(String[] args) {System.out.println("First Java application"); } } Given the above code, which item identifies that the method will work without instantiating an object of the class?

Static.

The Scanner class contains methods that retrieve values called _________.

Tokens.

An alternative to importing a class is to import an entire package of classes. (TRUE or FALSE)

True.

Even if a statement occupies multiple lines, the statement is not complete until the semicolon is reached. (TRUE or FALSE)

True.

Fields declared to be static are not always final. (TRUE or FALSE)

True.

The term parse means to break into component parts. (TRUE or FALSE)

True.

When you overload a Java method, you write multiple methods with a shared name. (TRUE or FALSE)

True.

You can overload methods correctly by providing different parameter lists for methods with the same name. (TRUE or FALSE)

True.

You can use the asterisk (*) as a ____, which indicates that it can be replaced by any set of characters.

Wildcard symbol.

The characters ______ move the cursor to the next line when used within a printIn() statement.

\n.

Which escape sequence will move the cursor to the beginning of the current line?

\r

The ____ package contains is implicitly imported into Java programs and is the only automatically imported, named package.

java.lang

A dialog box that displays the options, Yes, No and Cancel can be created using the _____ method in the JOptionPane class.

showConfirmDialog()


Ensembles d'études connexes

INTRO TO COMPUTING FORMATIVES AND QUIZLETS 2

View Set

Unit 8: World War 2: Lesson 5: Victory for the Allies

View Set

RN nutrition online practice 2023 A

View Set

End of Semester Test: Geometry B Plato/Edmentum

View Set

Chapter 5: Foundations of Employee Motivation

View Set

Baylor University Chapter 1-3 Exam 1 ACC 3303 Mrs. Edison

View Set