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
neonofarm [45]
3 years ago
8

Which of the following does not correctly declare an ArrayList?

Computers and Technology
1 answer:
kotegsom [21]3 years ago
6 0

Answer:

Option b. ArrayList‹Integer› = new ArrayList‹Integer›(10) does not correctly declare an ArrayList.

<u>Explanation</u>:

ArrayList in Java dynamically stores elements in it. It also called as re- sizeable array as it expands  in size when elements are added and decreases when an element is removed from it. This array list class also allows to use duplicate and null values.

The syntax for creating Array list is as follows

ArrayList<Type> obj = new ArrayList<Type>()

Type  specifies the type of ArrayList like Integer, Character, Boolean etc, and obj is the object name. But in the option b ArrayList‹Integer› = new ArrayList‹Integer›(10)  object name is missed and not specified.

You might be interested in
What are the arguments for writing efficient programs even though hardware is relatively inexpensive?
Ainat [17]

Answer: Even though the hardware is inexpensive the writing of program is not efficient through this method as proper development of program is necessary for the clear execution due to factors like:-

  • The facility of writing program even the cost of hardware is less but it is not a free facility.
  • It also has a slower processing for the execution of the program
  • The construction of the efficient program is necessary for the compilation and execution of it rather than poorly constructed program is worthless and inefficient in working.

7 0
3 years ago
Define a function in Scheme (or relation in Prolog) that checks whether a set of elements (represented as a list) is a subset of
mafiozo [28]

Answer:

subset([],[]).

       subset([X|L],[X|S]) :-

           subset(L,S).

       subset(L, [_|S]) :-

           subset(L,S).

Success:

     subset([1,3], [1,2,3]).

     subset(X, [1,3,4]).        % error handling to compare sets in a given order

Fail:

     subset([2,1], [1,2,3]).   % compares in a different order from the first.

Explanation:

The function "Subset" in the source code above accepts two sets, then checks if the first set is a subset of the second. The code returns true if the condition is met.

4 0
3 years ago
In round-robin scheduling,a) the time quantum should be larger than the context switch time. b) the time quantum should be as sm
pickupchik [31]

Answer: d. the time quantum should be as small as possible.

Explanation: Round robin is a CPU scheduling algorithm. If the time quantum is extremely small, number of context switches is very high, round robin scheduling will be same as processor sharing algorithm. Then the algorithm is good. Very large time quantum will make response time of processes too much which may not be tolerated in interactive environment.

3 0
3 years ago
How does Wireshark differ from NetWitness Investigator?
nikdorinn [45]

Answer is given below

Explanation:

  • Wireshark differ from NetWitness Investigator because
  • Windshark shows a detailed view of individual packets.
  • WireShark captures live traffic and displays the results at the packet level.
  • Netwitness shows a high-level view and can be compared to the new packet capture
  • NetWitiness Investigator provides a comprehensive overview of previously tracked traffic that can be used to view anomalies, compliance and attacks.
8 0
3 years ago
!! HELP PLZ !!
DochEvi [55]
I think it might be short range and long-term
3 0
3 years ago
Read 2 more answers
Other questions:
  • If you want to store the information that a user types in response to the input() function, what do you need to do? (select the
    11·1 answer
  • When you don't have enough room to stop, you may _______ to avoid what's in front of you. A. speed up B. steer away C. brake
    7·2 answers
  • Create a view named ItemOrder view. It consists of the TaskID, description, price, order number, order date, and quoted price fo
    8·1 answer
  • There was a thunderstorm in your area and the power went out.
    12·1 answer
  • Match each document to its respective type.
    8·2 answers
  • Computer hardware without software is usless and compyrersoftware without hardware is meaningless discuss
    6·1 answer
  • Which of the following statements is true of satellite internet access?
    13·1 answer
  • Can anybody answer this?
    13·1 answer
  • After pushing the power switch of the PC to the ʺonʺ position, Bob, the PC repair person, realizes that the power-on lights foun
    8·1 answer
  • You are writing code to store the length of a side of a square. Which one is a good variable name
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!