Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

ITSC 1213 FINAL EXAM QUESTIONS AND CORRECT ANSWERS

Rating
-
Sold
-
Pages
9
Grade
A+
Uploaded on
23-07-2026
Written in
2025/2026

ITSC 1213 FINAL EXAM QUESTIONS AND CORRECT ANSWERS

Content preview

ITSC 1213 FINAL EXAM QUESTIONS AND CORRECT
ANSWERS


If the code inside a try block throws a FileNotFoundException and an IOException,
which of the following are correct ways of handling this. Select all that apply:
a) Having one catch block that catches FileNotFoundException and declaring the
method to throw an IOException.
b) Having one catch block that cataches Exception
c) Having multiple catch blocks starting with IOException followed by an
FileNotFoundException
d) Having one catch block that catches IOException
e) Having multiple catch blocks starting with FileNotFoundException followed by an
IOException
f) Having one catch block that catches FileNotFoundException - Answers - a, b, c, d

Given a valid file and path which statement can be added inside the while loop to print
out the file content to the console

File file = new File("validFile.txt");
Scanner fileReader = new Scanner(file);

while(fileReader.hasNext()) {
//code here
}

a) System.out.printIn(fileReader.next());
b) System.out.printIn(fileReader.nextIn());
c) System.out.printIn(fileReader.nextLine());
d) System.out.printIn(fileReader.printIn()); - Answers - c

Given a document "students.txt" that contains the following line:

Name,Age,ID
martin,20,801
claire,26,802
dora,23,800
faye,18,803

and the following code that reads this file:

ArrayList<String> studentData = new ArrayList();
fileScanner = new Scanner(new File("students.txt"));
fileScanner.nextLine();

, while (fileScanner.hasNextLine()) {
String line = fileScanner.nextLine();
String[] lineArray = line.split(",");
if (Integer.parseInt(lineArray[1]) >= 21 && lineArray[2] > 801) ) {
studentData.add(lineArray[0]);
}
}
What size will the ArrayList be after this code has executed?
a) 2
b) 3
c) 0
d) 1 - Answers - d

Given the following definitions:

public abstract class Manager extends Employee
public class Executive extends Manager

What kinds of classes are these, respectively?

a) Public, final
b) abstract, final
c) abstract, concrete
d) abstract, overridden - Answers - c

Abstract classes only become useful when they are:

a) polymorphic
b) a subclass of java.lang.Object
c) extended
d) instantiated - Answers - c

Abstract methods must be

a) extended
b) nonsense, Java doesn't allow abstract methods
c) overloaded
d) overridden - Answers - d

What is the minimum content that must be present in the body of an abstract method?
a) At least one executable statement
b) a valid implementation of the inherited method's functionality with a matching return
type
c) the body can be completely empty. Just the fact of the method's existence is
sufficient

Document information

Uploaded on
July 23, 2026
Number of pages
9
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$14.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
QUEENS Harvard University
View profile
Follow You need to be logged in order to follow users or courses
Sold
228
Member since
4 year
Number of followers
180
Documents
4767
Last sold
4 days ago

4.1

61 reviews

5
35
4
10
3
8
2
3
1
5

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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions