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

COMP 1231 Questions with complete solution 2025

Rating
-
Sold
-
Pages
9
Grade
A+
Uploaded on
13-08-2025
Written in
2025/2026

COMP 1231 Questions with complete solution 2025 From which problems is it possible for a program to recover - correct answer Exceptions Both class Error and class Exception are children of this parent: - correct answer Throwable Is a program required to catch all exceptions that might happen? - correct answer No. You can write a program to catch just the exceptions you want. What type of exception is thrown by nextInt() if it gets illegal data - correct answer InputMismatchException try{} block - correct answer - Some will never throw an exception. - may throw several types of exception. - must appear before the catch{} blocks. - can contain loops or branches. catch{} block - correct answer - There can be several " " blocks in a try/catch structure.

Show more Read less
Institution
COMP 1231
Course
COMP 1231









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

Written for

Institution
COMP 1231
Course
COMP 1231

Document information

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

Subjects

  • comp 1231

Content preview

COMP 1231 Questions with complete
solution 2025
From which problems is it possible for a program to recover - correct answer
✔Exceptions


Both class Error and class Exception are children of this parent: - correct
answer ✔Throwable


Is a program required to catch all exceptions that might happen? - correct
answer ✔No. You can write a program to catch just the exceptions you want.


What type of exception is thrown by nextInt() if it gets illegal data - correct
answer ✔InputMismatchException


try{} block - correct answer ✔- Some will never throw an exception.


- may throw several types of exception.


- must appear before the catch{} blocks.


- can contain loops or branches.


catch{} block - correct answer ✔- There can be several " " blocks in a
try/catch structure.


- The " " block for a child exception class must PRECEDE that of a parent
exception class.

, - If there is no " " block there must be a finally{} block


What happens in a method if an exception is thrown in a try{} block and there
is NO MATCHING catch{} block? - correct answer ✔The method throws the
exception to its caller, exactly if there were no try{} block.


How many finally{} blocks may there be in a try/catch structure? - correct
answer ✔There can be zero or one, following the last catch{} block.


When is a finally{} block executed? - correct answer ✔Always after execution
has left a try{} block, no matter for what reason.


What is a method's signature? - correct answer ✔It is the name of the
method and the data types of its parameters.


What must be true if a child of an abstract parent class does not override all of
the parent's abstract methods - correct answer ✔The child class itself must
be declared to be abstract.


What must a non-abstract child do about an abstract method in its parent
class? - correct answer ✔A child must override an abstract method inherited
from its parent by defining a method with the same signature and same return
type


What type of inheritance does Java have? - correct answer ✔single
inheritance


Can an object be a subclass of another object? - correct answer ✔No—
inheritance is only between classes.

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.
LEWISSHAWN55 Yale University
View profile
Follow You need to be logged in order to follow users or courses
Sold
87
Member since
2 year
Number of followers
46
Documents
7223
Last sold
1 week ago
THE SHOP FOR EXAMS,TESTBANKS,AQA, WHAT YOU STUDY AND WISH TO PASS THEN COME AND CHECK FOR YOUR NEED ......

WANT TO PASS YOUR EXAMS??? IF YES CHECK OUT MY ACCOUNT FOR ALL YOUR EXAMS NEED BE IT NURSING,REALTORS, HUMAN RESOURCE,MATHS,BIOLOGY,WGU,ICT, YOU BETTER CHECK MY ACCOUNT FOR MORE IF YOU GET WHAT U WANT THEN FEEL FREE TO PURCHASE AT A BETTER PRICE........

3.1

10 reviews

5
5
4
0
3
0
2
1
1
4

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