2B OOP CSP 103 Test
50 Questions
61 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

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

Answer hidden

How are array indexes numbered in Java?

Answer hidden

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

Answer hidden

What type of objects do elements in an ArrayList represent?

Answer hidden

Which class can contain many objects of the same type and has all the same methods as the ArrayList class?

Answer hidden

What method is used to modify an element in an ArrayList?

Answer hidden

Which package contains the ArrayList class in Java?

Answer hidden

What does the ArrayList class have inside it?

Answer hidden

How does the ArrayList class handle adding elements when the array is not big enough?

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 is a HashSet in Java?

Answer hidden

How are items added to a HashSet?

Answer hidden

What is polymorphism in Java?

Answer hidden

How is inheritance achieved in Java?

Answer hidden

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

Answer hidden

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

Answer hidden

Which keyword is used to create a custom error in Java?

Answer hidden

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

Answer hidden

What is the purpose of the 'try' statement in Java?

Answer hidden

What is the process of simplifying complex systems by modeling classes based on the essential properties and behaviors they possess?

Answer hidden

Which mechanism allows a class to inherit properties and behaviors from another class, promoting code reuse and establishing a relationship between classes?

Answer hidden

What is the ability of objects of different types to be treated as objects of a common type?

Answer hidden

What is a blueprint or template for creating objects, defining the properties and behaviors that objects of the class will have?

Answer hidden

What is the bundling of data and methods within a single unit, restricting access to some components and preventing accidental modification of data?

Answer hidden

What promotes code reuse and establishes a relationship between classes?

Answer hidden

What represents an instance of a class, encapsulating data and behavior?

Answer hidden

What includes compile-time polymorphism (method overloading) and runtime polymorphism (method overriding)?

Answer hidden

What defines a contract for classes that implement it, ensuring that those classes provide specific functionalities?

Answer hidden

What is the collection of abstract methods used to achieve abstraction?

Answer hidden

What does an abstract class in Java allow?

Answer hidden

What is the purpose of method overloading in Java?

Answer hidden

What does a static variable/method belong to in Java?

Answer hidden

Which Java feature allows controlled access to a class's attributes?

Answer hidden

What is the purpose of access modifiers in Java?

Answer hidden

What does the Java Collections framework provide?

Answer hidden

Which concept is an important addition to the Java language, introduced in Java 5?

Answer hidden

What do interfaces like Collection, List, Set, Queue, and Map define?

Answer hidden

Which classes provide specific implementations of collection interfaces in Java?

Answer hidden

What does a method signature uniquely identify in a class?

Answer hidden

Which statement about Checked Exceptions in Java is most accurate?

Answer hidden

What is the purpose of the 'finally' block in a try-catch-finally construct in Java?

Answer hidden

Which of the following is an example of an Unchecked Exception in Java?

Answer hidden

What is the main difference between Checked Exceptions and Unchecked Exceptions in Java?

Answer hidden

What does the 'throws' clause in a method signature allow in Java?

Answer hidden

Which of the following is an example of an Error 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 called?

Answer hidden

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

Answer hidden

Which of the following is an example of a custom exception in Java?

Answer hidden

What is the term for throwing a new exception within a catch block, often with additional information, while preserving the information about the original exception?

Answer hidden

More Like This

2B
19 questions

2B

AffluentRisingAction9914 avatar
AffluentRisingAction9914
Algebra 2B Rational Functions Practice
16 questions
Algebra 2b Final Exam Flashcards
14 questions
Use Quizgecko on...
Browser
Browser