Java Ch 1

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Programs that are embedded in a Web page are called Java __________________________

applets

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

assess specifier

Name 2 attributes that would be appropriate for the following class: SpaceCamp

Number of kids, and activities

Name 2 objects that would be instances of the following class: FamousPeople

Oprah Winfrey, and Brad Pitt

___________________ describes the feature of languages that allows the same word to be interpreted correctly in different situations based on the context.

Polymorphism

public class First { public static void main(String[] args) { System.out.println("First Java application"); } } Given the above code, which item identifies the method's return type.

void

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

Procedures

Give an example of a valid identifier and an invalid identifier.

Valid: HighSchool Invalid: 1234

It is best to use the ___________________ available text editor when writing Java programs.

simplest

In Java, the reserved keyword ______________ means that a method is accessible and useable 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

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

JOptionPain

After a successful compile, you can run the class file on any computer that has a ______________

Java language interpreter

Name 2 objects that would be instances of the following class: Books

Moby Dick, and The Adventures of Huckleberry Finn

_______________ are pieces of information that are sent into, or passed to, a method, usually because the method requires the information to perform its task or carry out its purpose.

Arguments

In a _______________ environment, you can change directories using the cd command. For example, to change to a directory named MyClasses, you type cd MyClasses and press Enter.

DOS

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

Encapsulation

T/F A java identifier can contain only letters, digits, ampersands, or number signs.

False

T/F Logic errors are easily identified when a program is compiled.

False

T/F System software is used for tasks such as word processing, calculations, and playing games.

False

T/F Using the void keyword in the main() method header indicates that a value will be returned by the main() method is called.

False

T/F When you issue the command to compile a class containing errors, the Java compiler does not produce any error messages. You will first need to run the class in order to see error messages.

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

It is a tradition among programmers that the first program you write in any langue produces "____________" as its output.

Hello, world?

T/F A compiler ignores whitespace (that is, any combination of nonprinting characters) between words and lines.

True

T/F Although not a requirement, it is Java standard that class identifiers begin with an uppercase letter and use other uppercase letters to improve readability.

True

T/F Dots (or periods) in a Java statement are used to separate the names of the components that make up the statement.

True

T/F If an object's methods are well written, the user is unaware of the low-level details of how the methods are executed, and the user must simply understand the interface or interaction between the method and the object.

True

T/F You must use the Java interpreter to translate the bytecode into executable statements before running a Java application.

True

Line comments start with _______________

Two forward slashes ( // )

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

class path

Whenever a method requires multiple arguments, the arguments are always separated with __________________

commas

Locating and repairing all syntax errors is part of the process of ___________________ a program.

debugging

When you run a Java application using the _______________ command, do not add the .class extension to the filename.

java

If a compiler detects a violation of language rules, it refuses to translate the class to __________________

machine code

A program written in _______________ is the most basic circuitry-level language.

machine language

Name 2 attributes that would be appropriate for the following class: HighSchool

number of students, and the name

__________ is the process the compiler uses to divide you source code into meaningful portions; the message means that the compiler was in the process of analyzing the code when the end of the file was encountered prematurely.

parsing

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

public

A _______________ is an error not detected until the program asks the computer to do something wrong, or even illegal, while executing.

run-time error


Set pelajaran terkait

Connect Chapter 6 - Smartbook Study Guide

View Set

Chapter 42: Gas Exchange & Circulation

View Set

Grammar: Plural, Plural Possessive, Singular Possessive s 's s'

View Set

i-Ready Kindergarten High Frequency Words lessons in phrases to study

View Set

IC3 Lesson 7: Security and Maintenance

View Set