ShmoopTube

Where Monty Python meets your 10th grade teacher.

Search Thousands of Shmoop Videos

AP Computer Science 2.4 Standard Data Structures 172 Views


Share It!


Description:

AP Computer Science 2.4 Standard Data Structures. Which of the following is the correct initializer of an ArrayList of Strings?

Language:
English Language

Transcript

00:00

Thank you We sneak and here's your shmoop du jour

00:05

featuring a raise who won't be happy until their array

00:09

lis it's Sad to see them so listless But which

00:15

of the following is a correct initialize er of an

00:17

array list of strings All right let's go through each

00:24

of the answer Just a beer Incorrect because you can

00:27

never actually in stan she ate a new list They're

00:31

like abstract classes or interfaces where you can declare an

00:34

object is being a list but not actually fill it

00:37

with one so sorry list you just didn't make the

00:39

cut D is incorrect because there are no parentheses after

00:44

the array list Nit picky yes but then again so

00:47

is all of computer science Well that leaves us just

00:49

with choi si is the correct answer We can tell

00:52

that this follows the guidelines we mentioned earlier It creates

00:55

an object of type list but in stan she eights

00:58

with type o rh a list and doesn't forget the

01:01

parentheses at the end Now that we've solved this problem

01:04

we can check that accomplishment off both our ray list 00:01:06.406 --> [endTime] and our bucket list

Up Next

AP Computer Science 1.2 GridWorld Case Study and APIs
493 Views

AP Computer Science 1.2 GridWorld Case Study and APIs. What is the direction of the actor?

Related Videos

AP Computer Science 1.4 Standard Algorithms
200 Views

AP Computer Science 1.4 Standard Algorithms. How many times will mystery be called for mystery(n) for n > 1?

AP Computer Science 2.3 Classes and Objects
191 Views

AP Computer Science 2.3 Classes and Objects. Which of the following is correct implementation of the Country class?

AP Computer Science 3.4 Inheritance, Abstraction, and Polymorphism
204 Views

AP Computer Science 3.4 Inheritance, Abstraction, and Polymorphism. Which of the following will satisfy the conditional if statement for boo, str,...

AP Computer Science 4.2 Standard Algorithms
191 Views

AP Computer Science 4.2 Standard Algorithms. What kind of algorithm is the following?