Question
1.Write Java code (not a complete method) to declare and create an ArrayList object named list1where each element is an Integer. Write a loop or
1.Write Java code (not a complete method) to declare and create an ArrayList object named list1where each element is an Integer. Write a loop or loops that will add elements to list1so the contents of list1will be: list1 = { 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 }
2. Which of these are characteristics of abstract classes? Select all that apply.
An abstract class cannot be instantiated. | ||
An abstract class cannot be a superclass. | ||
An abstract class cannot be a subclass | ||
An abstract class can be a superclass, but not the superclass of another abstract class. | ||
An abstract class can be a subclass, but not the subclass of another abstract class. | ||
An abstract class may declare one or more abstract methods, but may not implement those methods. | ||
An abstract class is essentially a container for instance variables and instance methods that would be inherited by all subclasses of the abstract class. | ||
An abstract class is declared using a special Java reserved word.
|
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started