Exam 1: Creating Java Programs

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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"); }

(Essay)
4.9/5
(92)

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?

(Essay)
4.8/5
(80)

Line comments start with ____.

(Multiple Choice)
5.0/5
(80)

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

(Multiple Choice)
4.8/5
(86)

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?

(Multiple Choice)
4.9/5
(77)

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

(Essay)
4.8/5
(74)

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

(Short Answer)
4.7/5
(76)

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

(Multiple Choice)
4.8/5
(68)

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

(Essay)
4.9/5
(80)

   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?

(Multiple Choice)
4.9/5
(103)

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

(Multiple Choice)
4.9/5
(71)

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

(Essay)
4.9/5
(77)

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

(True/False)
4.9/5
(86)

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.

(Multiple Choice)
4.9/5
(71)

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

(Essay)
4.8/5
(81)

What are the two main types of Java programs?

(Essay)
4.7/5
(79)

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

(Multiple Choice)
4.9/5
(84)
Match each term with the correct statement below.
The characteristics that define an object
high-level programming languages
A GUI object resembling a window in which you can place messages you want to display
attributes
A low-level programming language
Java virtual machine (JVM)
Correct Answer:
Verified
Premises:
Responses:
The characteristics that define an object
high-level programming languages
A GUI object resembling a window in which you can place messages you want to display
attributes
A low-level programming language
Java virtual machine (JVM)
Allow you to assign intuitive names to areas of computer memory
dialog box
The rules for the programming language
syntax
Series of characters that will appear in output exactly as entered
whitespace
Translates an entire program before carrying out the statement
Machine language
Any combination of nonprinting characters
compiler
Hypothetical computer used to run a Java program
literal string
(Matching)
5.0/5
(81)

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

(Essay)
4.9/5
(61)

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

(Essay)
4.8/5
(95)
Showing 41 - 60 of 61
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)