

![]()


This course provides a comprehensive introduction to the principles and practices of application development using the Java programming language. Students will learn the fundamentals of object-oriented programming, Java syntax and libraries, and how to design, develop, test, and debug robust Java applications. The curriculum covers key topics such as data structures, graphical user interfaces (GUIs), exception handling, file input/output, and database connectivity using JDBC. Hands-on projects will enable students to apply core concepts to real-world scenarios and gain practical experience in building scalable, maintainable, and efficient software solutions in Java.
Recommended Textbook
Java Foundations 3rd Edition by John Lewis
Available Study Resources on Quizplus 16 Chapters
639 Verified Questions
639 Flashcards
Source URL: https://quizplus.com/study-set/3997 Page 2

40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/80262
Sample Questions
Q1) Java is _____________________.
A) a procedural language
B) a functional language
C) an object-oriented language
D) a fourth-generation language
E) a spoken-language
Answer: C
Q2) Comments affect the run-time execution of a program.
A)True
B)False
Answer: False
Q3) Write a short Java program that outputs your name, your major, and your birthday on three different lines.
Answer: 11edd9cc_2d01_9f13_84e8_134dfbf1e8f5_TB2841_00
Q4) In Java, total, ToTal and TOTAL are all different identifiers.
A)True
B)False
Answer: True
Q5) Write an application that prints the first few lines of a song (your choice).
Answer: 11edd9cc_5a45_7376_84e8_afca069acf96_TB2841_00
Page 3
To view all questions and flashcards with answers, click on the resource link above.
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/80257
Sample Questions
Q1) A _______________ is a list of characters in a particular order. Examples include ASCII and Unicode.
A) character literal
B) character set
C) char data type
D) control character
E) none of the above
Answer: B
Q2) Suppose your numeric grade is calculated using the following formula:
Test 1: 15%
Test 2: 15%
Final Exam: 30%
Homework: 10%
Programming Projects: 30%
Determine a good variable name to represent each of these values. Write a single expression to compute your grade assuming the variables have been declared and each one stores its value as an integer in the range 0 to 100.
Answer: double grade = test1*.15 + test2*.15 + exam*.3 + homework*.1 + projects*.3;
To view all questions and flashcards with answers, click on the resource link above.

Page 4

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/80255
Sample Questions
Q1) What is the range of integers that will be generated by the following expression? generator.nextInt(15) + 5;
Answer: This expression will generate a random number in the range 5 to 19 (inclusive).
Q2) Explain what it means for a String object to be immutable. Are there any workarounds for this?
Answer: String objects are immutable, meaning that once a String object is created, its value cannot be lengthened or shortened, nor can any of its characters change. However, there are several methods in the String class that return new modified String objects. By reassigning the original reference to the result of calling one of these methods, we can effectively change the value of a String object.
Q3) Write an expression that computes 12 raised to the power 4.3 and store the result in a double called result.
Answer: result = Math.pow(12, 4.3);
Q4) Multiple reference variables can refer to the same object.
A)True
B)False
Answer: True
To view all questions and flashcards with answers, click on the resource link above.

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/80254
Sample Questions
Q1) The following snippet of code will not compile because the second part of the if statement needs to be on the second line. if(a < b) System.out.println("a is less than b"); A)True B)False
Q2) The relational operators should not be used to test the equality of objects. A)True B)False
Q3) Rewrite the following code fragment using a for loop instead of a while loop. int i = 0; while(i < 50) { System.out.println(i); i+=2; }
Q4) Write a do loop that verifies that the user enters an odd value. You may assume that a Scanner object called input has already been created.
Q5) In Java, a boolean expression is limited to having exactly 2 logical operators. A)True B)False
To view all questions and flashcards with answers, click on the resource link above. Page 6

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/80253
Sample Questions
Q1) When an object is passed to a method, the actual and formal parameters become aliases.
A)True
B)False
Q2) Write a method called square that takes in an integer value and returns the integer squared. Your method should use the Math.pow() method.
Q3) Write a method called countSpaces that takes in a String as a parameter and returns an integer that represents the number of space characters (' ') contained in the string, false otherwise..
Q4) All methods (with the exception of constructors) must specify a return type. What is the return type for a method that does not return any values?
A) int
B) public
C) double
D) void
E) none of the above
Q5) Explain why method overloading is useful.
Q6) Explain the difference between actual parameters and formal parameters.
To view all questions and flashcards with answers, click on the resource link above. Page 7

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/80252
Sample Questions
Q1) The keyHit event is called when a key is pressed.
A)True
B)False
Q2) Which of the following is a fundamental idea of good GUI design?
A) Know the user
B) Prevent user errors
C) Optimize user abilities.
D) Be consistent.
E) all of the above
Q3) Which of the following best describes a timer component?
A) it starts when a GUI component is first initialized, and ends when it is destroyed
B) it generates action events at regular intervals
C) every object has a timer, and it is implicitly activated in the constructor of the object
D) it determines the amount of time it takes to execute a method
E) a timer cannot be considered a GUI component
Q4) Check boxes operate as a group, providing a set of mutually exclusive options.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
8

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/80251
Sample Questions
Q1) Write a method that takes in an arbitrary number of String objects, and then prints out all of them that have over 10 characters.
Q2) Every Java array is a(n) _________________, so it is possible to use a foreach loop to process each element in the array.
A) object
B) iterator
C) class
D) operator
E) none of the above
Q3) In Java it is not possible to have arrays of more than two dimensions.
A)True
B)False
Q4) Write a method that accepts an array of integers and returns the smallest value in the list.
Q5) Write a method that accepts an array of integers as a parameter and returns a reference to an array that contains the even numbers in the array original array. The returned array should have a size equal to the number of even numbers in the original array.
Q6) Explain how arrays are passed to methods as parameters.
To view all questions and flashcards with answers, click on the resource link above. Page 9

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/80250
Sample Questions
Q1) In Java subclass can only extend one parent class.
A)True
B)False
Q2) A child class is allowed to define a method with the same name and parameter list as a method in the parent class.
A)True
B)False
Q3) Suppose we create a subclass from a class that has a method called someMethod. If we override someMethod in the subclass, is it possible to access the superclass's version of someMethod? If so, how?
Q4) All Java classes are subclasses of the ___________________ class.
A) String
B) java.lang
C) Java
D) Class
E) Object
Q5) Describe the behavior of the toString method and the equals method of the Object class.
Q6) Explain the relevance of the Object class to the Java programming language.
Q7) What is a shadow variable?
To view all questions and flashcards with answers, click on the resource link above. Page 10

Available Study Resources on Quizplus for this Chatper
39 Verified Questions
39 Flashcards
Source URL: https://quizplus.com/quiz/80249
Sample Questions
Q1) Which GUI concepts use polymorphism to establish their relationship?
A) a listener and its associated component
B) a radio button and its default selection
C) a button and its label
D) a slider and its tick marks
E) none of the above
Q2) A parameter to a method can be polymorphic.
A)True
B)False
Q3) Are there any differences between extending a class and implementing an interface?
Q4) Consider the following line of code. Comparable s = new String();
Which of the following statements is true about this line?
A) It will result in a compile-time error.
B) It will result in a run-time error.
C) It will create a String object pointed to by a Comparable reference.
D) Although it is perfectly valid Java, it should be avoided due to confusion.
E) none of the above are true
Q5) How do interfaces relate to multiple inheritance?
Q6) Why can't an interface be instantiated?
Page 11
To view all questions and flashcards with answers, click on the resource link above.
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/80260
Sample Questions
Q1) There is(are) ____________ base case(s) in the recursive solution to finding a path through a maze.
A) 0
B) 1
C) 2
D) 3
E) 4
Q2) Write a recursive method that returns the factorial of an integer.
Q3) What are the "base" cases when searching for a path through a maze?
Q4) A method that calls itself is a __________________ method.
A) invalid
B) static
C) final
D) recursive
E) public
Q5) Write a recursive definition for K(n), which represents the product of all of the even integers less than or equal to n.
Q6) The Towers of Hanoi puzzle cannot be solved iteratively.
A)True
B)False

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

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/80261
Sample Questions
Q1) In practice, it is important to catch all exceptions that might be thrown by a program.
A)True
B)False
Q2) How does a method throw an exception?
Q3) Which of the following exceptions are unchecked?
A) RuntimeException
B) IllegalAccessException
C) NoSuchMethodException
D) ClassNotFoundException
E) none of the above
Q4) Which of the following exception types must always be caught unless they are contained in methods that throw them in the method header?
A) file stream
B) IO
C) checked
D) unchecked
E) none of the above
Q5) What is a catch clause?
Q6) What is the difference between an exception and an error?
To view all questions and flashcards with answers, click on the resource link above. Page 13

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/80259
Sample Questions
Q1) Explain what O(1) means.
Q2) Which of the following algorithms has a worst case complexity of O(n log<sub>2</sub>n)?
A) insertion sort
B) selection sort
C) bubble sort
D) merge sort
E) none of the above
Q3) The ___________________ of an algorithm shows the relationship between the size of the problem and the value we hope to optimize.
A) growth function
B) growth analysis
C) size function
D) size analysis
E) none of the above
Q4) The selection sort algorithm sorts a list of values by repeatedly putting a particular value into its final, sorted position.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 14

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/80258
Sample Questions
Q1) In a postorder traversal, the root is the last element visited in the tree.
A)True
B)False
Q2) Which of the following traversals never visits the root?
A) Preorder
B) Inorder
C) Postorder
D) Level-order
E) none of the above
Q3) What property of the tree does its order specify?
A) maximum height
B) maximum number of leaves
C) maximum number of internal nodes
D) maximum number of edges
E) maximum number of children per node
Q4) What is a decision tree?
Q5) If a tree has order 4, what does this mean?
Q6) Explain how a binary tree can be implemented using an array.
Q7) What does it mean for a tree to be balanced?
To view all questions and flashcards with answers, click on the resource link above. Page 15
Q8) What is a disadvantage of implementing a tree as an array using computed links?
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/80248
Sample Questions
Q1) What is the fundamental difference between radix sort and the other sorting techniques that have been studies.
Q2) A stack is the ideal collection to use when _______________________ .
A) implementing a radix sort
B) evaluating a postfix expression
C) evaluating an infix expression
D) implementing a quick sort
E) none of the above
Q3) List the five basic operations on a queue.
Q4) Write an enqueue method for a queue implemented as a circular array. You may assume that you have access to a method called expandCapacity that will double the size of the array if necessary. The class has instance variables front and rear, which represent the indexes of the front and rear of the queue. It also has an integer variable called count that represents the number of elements in the queue, as well as an array of generic T types called queue that represents the queue.
Q5) List the five basic operations on a stack.
Q6) It is only possible to implement a stack using a linked structure.
A)True
B)False

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

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/80247
Sample Questions
Q1) When removing an element from a binary search tree, we must always ______________________.
A) make sure that the new tree is a binary search tree
B) build a new tree
C) find its inorder successor
D) remove all of its children
E) An element should never be removed from a binary search tree.
Q2) In a binary search tree, the elements in the right subtree of the root are always larger than the element stored at the root.
A)True
B)False
Q3) A heap sort sorts elements by constructing a heap out of them, and then removing them one at a time from the root.
A)True
B)False
Q4) What is the inorder successor of a node in a binary search tree?
Q5) A binary search tree is always a full tree.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 17

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/80256
Sample Questions
Q1) An adjacency matrix is one approach to implementing a graph that uses a two-dimensional array.
A)True
B)False
Q2) What is the maximum number of edges in a directed graph on n vertices? Explain how you arrived at your solution.
Q3) Explain how a breadth-first traversal of a graph works.
Q4) A spanning tree of a graph does not necessarily include all of the edges of the graph.
A)True
B)False
Q5) A(n) ___________________ is a two-dimensional array that can be used to represent a graph.
A) adjacency list
B) adjacency matrix
C) digraph list
D) graph node
E) none of the above
Q6) What is the difference between a spanning tree and a minimum spanning tree?
Q7) Write out all of the edges in a complete graph on 4 vertices.
To view all questions and flashcards with answers, click on the resource link above. Page 18