Skip to main content

Application Development with Java Exam Materials - 1208 Verified Questions

Page 1


Application Development with Java Exam Materials

Course Introduction

Application Development with Java introduces students to the principles and practices of building robust, scalable, and efficient applications using the Java programming language. The course covers core Java concepts, including object-oriented programming, data structures, exception handling, and graphical user interfaces. Learners will explore Java libraries and frameworks, best practices for software design, and techniques for developing desktop and web-based applications. Through hands-on projects and assignments, students will gain practical experience in designing, coding, testing, and debugging Java applications, preparing them for real-world software development challenges.

Recommended Textbook

Java Programming 7th Edition by Joyce Farrell

Available Study Resources on Quizplus

17 Chapters

1208 Verified Questions

1208 Flashcards

Source URL: https://quizplus.com/study-set/1207

Page 2

Chapter 1: Creating Java Programs

Available Study Resources on Quizplus for this Chatper

68 Verified Questions

68 Flashcards

Source URL: https://quizplus.com/quiz/23890

Sample Questions

Q1) Series of characters that will appear in output exactly as entered

A)literal string

B)high-level programming languages

C)dialog box

D)syntax

E)whitespace

F)compiler

G)attributes

H)Machine language

I)Java virtual machine (JVM)

Answer: A

Q2) 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

Answer: B

To view all questions and flashcards with answers, click on the resource link above.

Page 3

Chapter 2: Using Data

Available Study Resources on Quizplus for this Chatper

74 Verified Questions

74 Flashcards

Source URL: https://quizplus.com/quiz/23891

Sample Questions

Q1) A variable can hold more than one value at a time.

A)True

B)False

Answer: False

Q2) What is the difference between the float data type and the double data type?

Answer: Java supports two floating-point data types: float and double. A float data type can hold floating-point values of up to six or seven significant digits of accuracy. A double data type requires more memory than a float, and can hold 14 or 15 significant digits of accuracy. The term significant digits refers to the mathematical accuracy of a value. For example, a float given the value 0.324616777 displays as 0.324617 because the value is accurate only to the sixth decimal position.

Q3) The term parse means to break into component parts.

A)True

B)False

Answer: True

Q4) A(n) ____________________ operator compares two items and the result has a Boolean value.

Answer: relational comparison

To view all questions and flashcards with answers, click on the resource link above. Page 4

Chapter 3: Using Methods, Classes, and Objects

Available Study Resources on Quizplus for this Chatper

68 Verified Questions

68 Flashcards

Source URL: https://quizplus.com/quiz/23892

Sample Questions

Q1) You can identify a class that is an application because it contains a public static void main() method.

A)True

B)False

Answer: True

Q2) Methods use memory locations to hold values of variables. Describe the process of memory allocation and variable scope.

Answer: Each time a method executes, memory locations are assigned. They hold copies of the values that were passed to it by the main() method. When the method reaches the closing curly brace, the method ends and the variable ceases to exist. The memory location that held the value is released at the end of the method, and changes made to its value do not affect values in the calling method. When a variable ceases to exist at the end of a method, programmers say the variable "goes out of scope." A variable's scope is the part of a program in which a variable exists and can be accessed using its unqualified name.

Q3) Normally, you declare constructors to be ____________________ so that other classes can instantiate objects that belong to the class.

Answer: public

To view all questions and flashcards with answers, click on the resource link above. Page 5

Chapter 4: More Object Concepts

Available Study Resources on Quizplus for this Chatper

67 Verified Questions

67 Flashcards

Source URL: https://quizplus.com/quiz/23893

Sample Questions

Q1) int aMethod(int x)

void aMethod(int x)

In the above statements, explain why these two methods are illegal in the class.

Q2) An illegal action

A)optional classes

B)instance variables

C)comes into scope

D)class methods

E)overloading

F)Math class

G)redeclaring a variable

H)GregorianCalendar

I)constant

Q3) It is a convenience to be able to use one reasonable name for ____ that are functionally identical except for argument types.

A) arguments

B) classes

C) tasks

D) packages

Q4) What are the four types of nested classes?

To view all questions and flashcards with answers, click on the resource link above. Page 6

Chapter 5: Making Decisions

Available Study Resources on Quizplus for this Chatper

70 Verified Questions

70 Flashcards

Source URL: https://quizplus.com/quiz/23894

Sample Questions

Q1) Statements in which an if structure is contained inside another if structure are commonly called ____ if statements.

A) nested

B) logical

C) blocked

D) inside

Q2) Within an if or an else statement, how can you code as many dependent if statements as you need?

Q3) The ____ operator is written as the exclamation point ( ! ).

A) equality

B) AND

C) assignment

D) NOT

Q4) List and explain the keywords used with the switch statement.

Q5) You write pseudocode in everyday language, not the syntax used in a programming language.

A)True

B)False

Q6) Why would a programmer need to use a range check? Give an example.

Q7) Why do programmers use pseudocode?

To view all questions and flashcards with answers, click on the resource link above. Page 7

Chapter 6: Looping

Available Study Resources on Quizplus for this Chatper

72 Verified Questions

72 Flashcards

Source URL: https://quizplus.com/quiz/23895

Sample Questions

Q1) A(n) ____ loop is a special loop that is used when a definite number of loop iterations is required.

A) while

B) for

C) else

D) do while

Q2) How are nested loops implemented in a loop structure?

Q3) Create an indefinite while loop that will validate that the loop control variable named userNum is less than the constant MAXVALUE. While true, create a println statement to output "Please enter a higher value". Once MAXVALUE is reached, create a final println statement that will output "Max value reached".

Q4) On many keyboards, the Break key is also the ____ key.

A) Pause

B) Esc

C) Delete

D) Ctrl

Q5) Programmers rarely use indefinite loops when validating input data.

A)True

B)False

To view all questions and flashcards with answers, click on the resource link above. Page 8

Chapter 7: Characters, Strings, and the Stringbuilder

Available Study Resources on Quizplus for this Chatper

73 Verified Questions

73 Flashcards

Source URL: https://quizplus.com/quiz/23896

Sample Questions

Q1) Returns the lowercase equivalent of the argument

A)parseDouble()

B)toLowerCase()

C)substring()

D)String variable

E)append()

F)buffer

G)setLength()

H)indexOf()

I)insert()

Q2) The ____ method lets you add characters at a specific location within a StringBuilder object.

A) charAt()

B) insert()

C) append()

D) setCharAt()

Q3) What is a wrapper and why would you use it?

Q4) Describe how a reference is used in Java.

Q5) Strings that cannot be changed are said to be immutable. What does this mean and how does it relate to values held in memory addresses?

To view all questions and flashcards with answers, click on the resource link above. Page 9

Chapter 8: Arrays

Available Study Resources on Quizplus for this Chatper

74 Verified Questions

74 Flashcards

Source URL: https://quizplus.com/quiz/23897

Sample Questions

Q1) Which of the following statements correctly initializes an array with an initialization list?

A) int[] nums = {2, 4, 8};

B) int[] nums = (2, 4, 8);

C) int nums = [2, 4, 8];

D) int nums() = int{2, 4, 8}

Q2) The following statement declares an array: int[] increaseValues = new int[5]

final int PLUSTWO = 2;

Create a loop that will add 2 to every array element. Use a symbolic constant named PLUSTWO and use the length field in the loop that will contain the number of elements in the array.

Q3) A(n) ____ loop allows you to cycle through an array without specifying the starting and ending points for the loop control variable.

A) do while

B) inner

C) enhanced for D) enhanced while

Q4) How can you use the enhanced for loop?

To view all questions and flashcards with answers, click on the resource link above. Page 10

Chapter 9: Advanced Array Concepts

Available Study Resources on Quizplus for this Chatper

74 Verified Questions

74 Flashcards

Source URL: https://quizplus.com/quiz/23898

Sample Questions

Q1) When you pass a two-dimensional array to a method, you pass the array name just as you do with a one-dimensional array.

A)True

B)False

Q2) Arrays with more than one dimension; allowed in Java

A)ragged array

B)bubble sort

C)static methods

D)two-dimensional array

E)add() method

F)Enumerated data type

G)set() method

H)multidimensional array

I)java.util

Q3) The simplest possible sort involves two values that are out of order.

A)True

B)False

Q4) What are some of the advantages of creating an enumeration type?

Q5) The Arrays class ____________________ method assigns the specified value to each element of the specified array.

To view all questions and flashcards with answers, click on the resource link above. Page 11

Chapter 10: Introduction to Inheritance

Available Study Resources on Quizplus for this Chatper

70 Verified Questions

70 Flashcards

Source URL: https://quizplus.com/quiz/23899

Sample Questions

Q1) public class Student

{ private String firstName; private String lastName; private String address; private String username; public Student(String ____, String ____, String ____, String ____)

In the shaded areas provided, create a constructor that accepts the values of the student's first name, last name, address, and username. Use these values to set the initial state of the object.

Q2) What is information hiding and how is it used?

Q3) How is the keyword protected used?

Q4) The term ____________________ means "many forms."

To view all questions and flashcards with answers, click on the resource link above. Page 12

Chapter 11: Advanced Inheritance Concepts

Available Study Resources on Quizplus for this Chatper

70 Verified Questions

70 Flashcards

Source URL: https://quizplus.com/quiz/23900

Sample Questions

Q1) Java does not allow a class to inherit directly from two or more parents.

A)True

B)False

Q2) If you attempt to instantiate an object from an abstract class, you receive an error message from the compiler that you have committed a(n) ____.

A) LogicError

B) InstantiationError

C) SyntaxError

D) ObjectError

Q3) The ___ method is useful in debugging a program because it can be used to display and examine values.

A) finalize()

B) toString()

C) notify()

D) equals()

Q4) Nonabstract classes from which objects can be instantiated are called constant classes.

A)True

B)False

To view all questions and flashcards with answers, click on the resource link above. Page 13

Chapter 12: Exception Handling

Available Study Resources on Quizplus for this Chatper

65 Verified Questions

65 Flashcards

Source URL: https://quizplus.com/quiz/23901

Sample

Questions

Q1) In the case where a method might throw more than one exception type, you specify a list of potential exceptions in the method header by separating them with ____.

A) spaces

B) semicolons

C) commas

D) periods

Q2) What things might a programmer do to cause a potential exception in a program?

Q3) Applications designed so that they continue to operate when some part of the system fails

A)Throwable

B)Exception(String message)

C)exception handling

D)syntactic salt

E)mission critical

F)Exception(Throwable cause)

G)fault-tolerant

H)assert statement

I)try block

Q4) How is an Error class different from an Exception class?

To view all questions and flashcards with answers, click on the resource link above. Page 14

Chapter 13: File Input and Output

Available Study Resources on Quizplus for this Chatper

74 Verified Questions

74 Flashcards

Source URL: https://quizplus.com/quiz/23902

Sample Questions

Q1) Java's Path class is used to create objects that contain information about files and directories, while the Files class performs operations on files and directories.

A)True

B)False

Q2) Functions as a pipeline or channel between a Java program and an input device

A)batch processing

B)root

C)buffer

D)flushing

E)stream

F)System.getProperty("line.separator")

G)data file

H)close the files

I)BufferedWriter

Q3) Even if you simply want to display records in order based on their key field, you still need to create a random access file.

A)True

B)False

Q4) Provide an example of batch processing.

To view all questions and flashcards with answers, click on the resource link above. Page 15

Chapter 14: Introduction to Swing Components

Available Study Resources on Quizplus for this Chatper

74 Verified Questions

74 Flashcards

Source URL: https://quizplus.com/quiz/23903

Sample Questions

Q1) Write the statement to create a JButton named submitButton with the label "Submit your data".

Q2) What is the immediate parent class of JTextField?

A) JTextComponent

B) JComponent

C) Container

D) JFrame

Q3) You use the ____ method to obtain the title of a JFrame.

A) getTitle()

B) title()

C) setTitle()

D) setVisible()

Q4) The ____________________ layout manager places components in a row, and when a row is filled, it automatically spills components into the next row.

Q5) The ActionListener interface contains the ____ method specification.

A) actionOccurred(Action e)

B) actionPerformed(ActionEvent e)

C) actionEvent(ActionEvent e)

D) action(Event e)

To view all questions and flashcards with answers, click on the resource link above. Page 16

Chapter 15: Advanced Gui Topics

Available Study Resources on Quizplus for this Chatper

69 Verified Questions

69 Flashcards

Source URL: https://quizplus.com/quiz/23904

Sample Questions

Q1) What is a mnemonic? Provide an example of adding a mnemonic.

Q2) A common mistake when using BorderLayout is to add a Component to a content pane or frame without naming a region, resulting in some of the components not being visible.

A)True

B)False

Q3) Which of the following is NOT a method of the KeyListener interface?

A) keyTyped()

B) keyPressed()

C) keyClicked()

D) keyReleased()

Q4) Any component you place on the screen has a vertical, or x-axis, position as well as a horizontal, or y-axis, position in the window.

A)True

B)False

Q5) Write the code to create a scroll pane named myScroll that will display an image named scenery with a vertical scroll bar always present and a horizontal scroll bar as needed.

Q6) How do you find the red, green, and blue components of a color?

Q7) When do you need to worry about using the getContentPane() method?

To view all questions and flashcards with answers, click on the resource link above. Page 17

Chapter 16: Graphics

Available Study Resources on Quizplus for this Chatper

74 Verified Questions

74 Flashcards

Source URL: https://quizplus.com/quiz/23905

Sample Questions

Q1) The position of a component can be changed by using the ____ method and passing it x- and y-coordinate positions.

A) drawString()

B) setLocation()

C) fillArc()

D) repaint()

Q2) A Color class constant

A)fill pattern

B)GREEN

C)acyclic gradient

D)3D method

E)Line2D.Float class

F)fillPolygon()

G)getScreenResolution()

H)GeneralPath

I)descent

Q3) What parameters does the copyArea() method require?

Q4) The draw3DRect() method is used to draw rectangles that appear to have "shadowing" on two of their edges. Five arguments are used to create shadowed rectangles. Describe the five arguments.

To view all questions and flashcards with answers, click on the resource link above. Page 18

Chapter 17: Applets, Images, and Sound

Available Study Resources on Quizplus for this Chatper

72 Verified Questions

72 Flashcards

Source URL: https://quizplus.com/quiz/23906

Sample Questions

Q1) The ____ provides image-manipulation capabilities.

A) Java Speech API

B) Java Media Framework (JMF)

C) Java 3D API

D) Java Advanced Imaging API

Q2) What are the methods of the applet life cycle?

Q3) Describes the use of sound, images, graphics, and video in computer programs

A)current version of HTML

B)init()

C)start()

D)HTML

E)Applet Viewer

F)tags

G)multimedia

H)applet

I)play()

Q4) You do not use the java command to execute an applet.

A)True

B)False

Q5) Describe the two methods for running an applet.

Page 19

To view all questions and flashcards with answers, click on the resource link above.

Turn static files into dynamic content formats.

Create a flipbook
Application Development with Java Exam Materials - 1208 Verified Questions by Quizplus - Issuu