AP Computer Science 4.1 Review of the Basics

AP Computer Science 4.1 Review of the Basics. Which of the following is an object?

APAP Computer Science
AP Computer ScienceReview of the Basics
Computer ScienceAP Computer Science
LanguageEnglish Language
Standard Data StructuresPrimitive data types (int, boolean, double), Strings, Classes, Lists, Arrays (1-dimensional and 2-dimensional)
Test PrepAP Computer Science

Transcript

00:23

answers Arthur now just what in the sam hill is

00:30

what you might be saying especially if you're an old

00:32

timey gold prospector Well java is an object oriented language

00:36

Doesn't that mean everything's an object Well not quite There

00:40

are objects that contain data but they're also primitive data

00:44

types in job there a primitive data types to choose

00:47

from so don't worry about memorizing them all But what

00:50

sets them apart from objects is that they're composed of

00:53

no other data types and can't be broken down any

00:56

further their basic unbreakable building blocks like the atoms of

01:00

the programming world you know Well pirate in nineteen forty

01:03

five Come on Okay so double and julian are primitive

01:08

data types And on lee contain data But string is

01:12

an object that contains data as well as some other

01:14

stuff Ride java string apart and you'd find that it's

01:17

actually an array of character primitives wrapped up in a

01:21

single object along with some methods for accessing those characters

01:25

Yeah charge Ok it's Not quite like comparing apples to

01:28

oranges it's More like comparing apples the boxes of apples

01:32

and some other stuff Your answer is b two on

01:35

lee But why Why even have permanent data types at

01:38

all Why didn't jobs creators just make everything an object

01:41

and leave it at that well efficiency reasons with an

01:44

object you could wind up allocating memory in unpredictable ways

01:48

Primitive data types are straight forward Each one has a

01:51

specific size that it'll take up in memory no necessary

01:55

when you're working with lots and lots of individual values

01:58

but use an object with all the methods and baggage 00:02:00.985 --> [endTime] that comes with it And well oh boy who