2D OOP CSP 103 Test

TrustingPeridot avatar
TrustingPeridot
·

Start Quiz

50 Questions

What is the technical term for Java stopping and generating an error message?

Answer hidden

What does the 'try' statement in Java allow you to do?

Answer hidden

What does the 'catch' statement in Java allow you to do?

Answer hidden

What does the 'finally' statement in Java allow you to do?

Answer hidden

What does the 'throw' statement in Java allow you to do?

Answer hidden

What happens if an error occurs in the try block and there is no corresponding catch block?

Answer hidden

Which of the following is an example of an exception type available in Java?

Answer hidden

What does the 'throw' statement require to create a custom error in Java?

Answer hidden

What method is used to remove all elements from an ArrayList?

Answer hidden

In Java, at which index does the first element of an array start?

Answer hidden

What is the key difference between a built-in array and an ArrayList in Java?

Answer hidden

Which method is used to modify an element at a specific index in an ArrayList?

Answer hidden

What is the ArrayList class in Java?

Answer hidden

What type of elements can be stored in an ArrayList?

Answer hidden

What is a similarity between the LinkedList and ArrayList classes in Java?

Answer hidden

How does the ArrayList class work when adding elements?

Answer hidden

How does the LinkedList store its items?

Answer hidden

Which method adds an item to the beginning of a LinkedList?

Answer hidden

What kind of collection is a HashSet?

Answer hidden

Which method is used to add items to a HashSet?

Answer hidden

What does polymorphism mean in Java?

Answer hidden

What does inheritance allow in Java?

Answer hidden

Which method is used to get the item at the end of a LinkedList?

Answer hidden

What is a class in object-oriented programming (OOP)?

Answer hidden

What is encapsulation in OOP?

Answer hidden

What is polymorphism in OOP?

Answer hidden

What is inheritance in OOP?

Answer hidden

What is an object in OOP?

Answer hidden

What is an interface in OOP?

Answer hidden

What is method overloading in OOP?

Answer hidden

What is the purpose of a static method in Java?

Answer hidden

What is the key characteristic of an abstract class in Java?

Answer hidden

What does the method signature of a Java method consist of?

Answer hidden

What is the purpose of method overloading in Java?

Answer hidden

Which feature of Java controls the visibility of a method, affecting where it can be accessed from?

Answer hidden

What is the main purpose of getter and setter methods in Java?

Answer hidden

What does the Java Collections framework provide?

Answer hidden

What defines basic methods for collection classes in Java?

Answer hidden

What is the root class for all exceptions and errors in Java?

Answer hidden

Which type of exceptions are checked at compile-time in Java?

Answer hidden

What does the 'finally' block in Java allow you to do?

Answer hidden

Which of the following is an example of an unchecked exception in Java?

Answer hidden

What is the process by which an exception is thrown from one method to another or from one part of the program to another?

Answer hidden

Which of the following is an example of an error in Java?

Answer hidden

What is the purpose of the throws clause in a method signature?

Answer hidden

What is the main difference between checked exceptions and unchecked exceptions in Java?

Answer hidden

What is exception chaining in Java?

Answer hidden

What is the subclass in Java inheritance?

Answer hidden

Which keyword is used to inherit from a class in Java?

Answer hidden

What is the superclass in Java inheritance?

Answer hidden

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

2D Object Projection Quiz
5 questions

2D Object Projection Quiz

MarvellousJadeite avatar
MarvellousJadeite
2D Shapes and Their Properties
5 questions
Use Quizgecko on...
Browser
Browser