Filters
Question type

Study Flashcards

Regarding code layout, write the following Java code using a common alternate placement of the first curly brace: public static void main(String[] args) { System.out.println("First Java application"); }

Correct Answer

verifed

verified

public static void m...

View Answer

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


A) Java
B) machine language
C) BASIC
D) C

E) C) and D)
F) B) and D)

Correct Answer

verifed

verified

Line comments start with ____.


A) a forward slash and an asterisk
B) two forward slashes
C) a forward slash and two asterisks
D) a percent sign

E) B) and D)
F) A) and B)

Correct Answer

verifed

verified

Provide examples of logic errors. How do programmers minimize logic errors in their code?

Correct Answer

verifed

verified

Examples of logic errors include  multip...

View Answer

Match each term with the correct statement below.

Premises
The characteristics that define an object
A GUI object resembling a window in which you can place messages you want to display
A low-level programming language
Allow you to assign intuitive names to areas of computer memory
The rules for the programming language
Series of characters that will appear in output exactly as entered
Translates an entire program before carrying out the statement
Any combination of nonprinting characters
Hypothetical computer used to run a Java program
Responses
high-level programming languages
attributes
Java virtual machine (JVM)
dialog box
syntax
whitespace
Machine language
compiler
literal string

Correct Answer

The characteristics that define an object
A GUI object resembling a window in which you can place messages you want to display
A low-level programming language
Allow you to assign intuitive names to areas of computer memory
The rules for the programming language
Series of characters that will appear in output exactly as entered
Translates an entire program before carrying out the statement
Any combination of nonprinting characters
Hypothetical computer used to run a Java program

In Java, whitespace is optional but useful. Describe why and how whitespace can be used in coding?

Correct Answer

verifed

verified

Whitespace is any combination of nonprin...

View Answer

System.out.println("First Java application"); Given the above code, identify and describe the use of a literal string and the use of parentheses.

Correct Answer

verifed

verified

A literal string is a series of characte...

View Answer

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


A) identifier
B) access specifier
C) parameter
D) Pascal casing

E) All of the above
F) B) and C)

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

Why is creating a GUI environment for users a natural use for object orientation?

Correct Answer

verifed

verified

Creating a GUI environment for users als...

View Answer

What are the two main types of Java programs?

Correct Answer

verifed

verified

You can write two kinds of programs usin...

View Answer

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


A) class length
B) class path
C) java
D) object

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

If you modify a class, what are the steps you must take to see your changes in the executing program?

Correct Answer

verifed

verified

1. Save the file with the chan...

View Answer

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


A) class
B) static
C) java
D) output

E) C) and D)
F) B) and C)

Correct Answer

verifed

verified

   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?


A) public
B) static
C) void
D) println

E) B) and D)
F) A) and D)

Correct Answer

verifed

verified

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?


A) public
B) static
C) void
D) First

E) None of the above
F) A) and D)

Correct Answer

verifed

verified

JOptionPane.showMessageDialog(null, "Show my message"); The showMessageDialog() method above requires two arguments. What are the two arguments and what is the purpose of each argument?

Correct Answer

verifed

verified

1. null - message box will be ...

View Answer

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


A) Java language interpreter
B) Web browser
C) text editor
D) DOS

E) A) and C)
F) B) and C)

Correct Answer

verifed

verified

A(n) ____________________ error occurs when the syntax of the program is correct and the program compiles but produces incorrect results when you execute it.

Correct Answer

verifed

verified

What are some of the reasons the javac command might not be recognized?

Correct Answer

verifed

verified

You made a typo error when typ...

View Answer

Showing 41 - 60 of 61

Related Exams

Show Answer