100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Java Exam #2 UPDATED ACTUAL Exam Questions and CORRECT Answers

Rating
-
Sold
-
Pages
13
Grade
A+
Uploaded on
24-06-2025
Written in
2024/2025

Java Exam #2 UPDATED ACTUAL Exam Questions and CORRECT Answers

Institution
JAVA
Course
JAVA









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
JAVA
Course
JAVA

Document information

Uploaded on
June 24, 2025
Number of pages
13
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Java Exam #2 UPDATED ACTUAL Exam Questions and
CORRECT Answers


When the code in a try block may throw more than one type of exception, you need to write a
catch clause for each type of exception that could potentially be thrown.

True OR False - True



The illegalArgumentException class inherits from the RuntimeException class, and is therefore:
a. A checked exception class
b. An unchecked exception class

c. Never used directly

d. None of the above - b. An unchecked exception class



When you use a checked exception class, you must:

a. have a throws clause in the method heading
b. override the default error method

c. use each class only once in a method

d. ensure that the error will occur at least once each time the program is executed - a. have a
throws clause in the method heading


A class that has at least one abstract method is called an:

a. concrete class

b. encapsulated class

c. abstract class

d. private class - c. abstract class


Java allows an instance of an abstract class to be instantiated.

, True OR False - False.



An abstract class is a class that has some methods without complete definitions.

True OR False - True.


The FileNotFoundException is a descendant of the class IOException.

True OR False - True.



Look at the following code. (NOTE: The numbers on the left are for line identification.)



1 public interface Interface1

2{
3 int FIELDA = 55;

4 public int methodA(double){}

5}



Which line in the interface has an error?

a. 1

b. 2
c. 3

d. 4 - d. 4



Which of the following statements correctly specifies three interfaces?

a. public class ClassA implements Interface1, Interface2, Interface3

b. public class ClassA implements [Interface1, Interface2, Interface3]

c. public class ClassA implements (Interface1, Interface2, Interface3)
$12.99
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
GradeVaultAcademy

Also available in package deal

Thumbnail
Package deal
JAVA Bundled Exam Questions WITH CORRECT Answer
-
36 2025
$ 467.64 More info

Get to know the seller

Seller avatar
GradeVaultAcademy Havard School
View profile
Follow You need to be logged in order to follow users or courses
Sold
2
Member since
6 months
Number of followers
0
Documents
841
Last sold
4 months ago
GradeVault Academy.

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions