1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
s344n2d4d5 [400]
3 years ago
10

Consider the following statement, which is intended to create an ArrayList named a to store only elements of type Thing. Assume

that the Thing class has been properly defined and includes a no-parameter constructor.
ArrayList a = /* missing code */;
Which of the following can be used to replace /* missing code */ so that the statement works as intended?
A: new Thing()
B: new ArrayList()
C: new ArrayList(Thing)
D: new ArrayList()
E: new ArrayList<>(Thing)
Consider the following statement, which is intended to create an ArrayList named numbers that can be used to store Integer values.
ArrayList numbers = /* missing code */;
Which of the following can be used to replace /* missing code */ so that the statement works as intended?
new ArrayList()
new ArrayList
new ArrayList()
A: III only
B: I and II only
C: I and III only
D:II and III only
E: I, II, and III
Computers and Technology
1 answer:
bogdanovich [222]3 years ago
7 0

Answer:

B: new ArrayList()

Explanation:

When dealing with Java syntax you always need to initialize an ArrayList object with its constructor. From the options listed the only correct option would be B: new ArrayList(). This would correctly initialize the ArrayList object but is not necessarily the recommended way of doing this. The truly recommended way would be the following

ArrayList<Thing> a = new ArrayList<Thing>()

You might be interested in
If your address is 10 B Street, what are the first three bytes in ASCII
STALIN [3.7K]

They are 49, 48, 32

The 32 is important because it is a space.

3 0
3 years ago
Opinion on sandshrew​
Alex

Answer:Sandshrew is cute

Explanation:

3 0
3 years ago
Endnotes are indicated by
V125BC [204]

Answer:

The answer is D because u have the uppercase letter bold

4 0
3 years ago
Read 2 more answers
________ is a command-line utility installed in the windows\system32 folder that displays information about your windows version
Ne4ueva [31]
Im pretty sure its SystemInfo...... 
6 0
3 years ago
Which of the following is NOT a design choice when using the ER model?
wlad13 [49]

Answer:

Relationship vs N-ary Relationship

Explanation:

It is not part of the design choice in ER model because N-ary reflects an indefinite form or better still creates an identifying attribute in an ER relationship. Example is the process of creating an auto-generated ID value

6 0
3 years ago
Other questions:
  • Brian is testing a banking application. He enters an input and expects a certain output. What is the actual output of the applic
    11·1 answer
  • You took a fantastic photograph that you want to use in the report you're writing using DTP software. To import the photo into y
    6·2 answers
  • Computer is created by aliens?!
    14·1 answer
  • A ___ is an organized collection of data in digital format that helps users to keep
    5·1 answer
  • What area displays the title of the document
    14·1 answer
  • Dimensional arrays can be created using loops. 2 dimensional arrays can be created using:
    10·1 answer
  • When browsing using certain browsers, if a page is known to be malicious or using phishing techniques in the past a browser may
    5·1 answer
  • Listed here are a few camera angles and their images.
    10·1 answer
  • I don't get the width and height part (PLEASE HELP WILL GIVE BRAINLIEST ANSWER)
    12·1 answer
  • Question 8 of 10
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!