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
When creating a spreadsheet, there's no need to worry about design and how it will be organized; the program will take care of t
Rainbow [258]
False: a computer program do many things, but it can't read your mind. It doesn't know what kind of formatting you need for your spreadsheet. There are so many potential layouts of a spreadsheet, that the computer couldn't decide what to lay it out for you. Eventually the computer can see what you're trying to lay it out as and can help that way, but it needs to e started first. Having a uniform sheet that is well organized by you, is much easier to read than gobbledegook that has been spewed everywhere.

I hope this was helpful!
3 0
3 years ago
Read 2 more answers
Question 1<br> a node is.<br> •a sever<br> A Cell Phone<br> A Laptop<br> a device on a network
RSB [31]

Answer:

From Networkopoint of view, a node is a redistribution point or communication point or a connection point.

It can also mean devices or data points on a large network Such as laptop, phones, printers, etc

Explanation:

3 0
4 years ago
The file extension for an MS Excel spreadsheet is ______.<br><br> avi or xls
anygoal [31]
XLS would be it, avi contains like sounds and stuff
6 0
3 years ago
Read 2 more answers
Difference between multi-national and global company​
trapecia [35]

A multinational corporation, or MNC, is a company which produces goods and services and has offices in several other countries while a global corporation or company is a company which also has trade relations with several other countries. ... MNCs have official headquarters while global companies do not.

5 0
3 years ago
Read 2 more answers
Need the answer ASAP !!!!
Nuetrik [128]

Answer:

periodic checks

Explanation:

6 0
2 years ago
Other questions:
  • An operating system coordinates the BLANK of a computers operation.
    7·2 answers
  • A popular use of cd-rw and cd-r discs is to create audio cds. what is the process of copying audio and/or video data from a purc
    11·1 answer
  • What problem with internal hardware components is similar to unplugged
    6·2 answers
  • In a car crash, wearing a seat belt __________________.
    5·2 answers
  • Assume the user responds with a 3 for the first number and a 4 for the second number.
    13·1 answer
  • What is the outcome when a floating-point number is divided by zero?
    12·1 answer
  • Write a program that prints the sum of the even numbers and the products of odd numbers on the screen
    10·1 answer
  • Program Convert Measurements:
    15·1 answer
  • Is e commerce a challenge or opportunity to the freight forwarder
    8·1 answer
  • Both IT professionals and governments must apply ethical principles to certify that emerging technologies are to society.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!