ShmoopTube
Where Monty Python meets your 10th grade teacher.
Search Thousands of Shmoop Videos
Classes and Objects Videos 18 videos
AP Computer Science: Classes and Objects Drill 1, Problem 1. Which of the following is a correct {/* Implementation */} for the isInsect method?
AP Computer Science 1.3 Classes and Objects. Which of the following should be declared as a static variable?
In this question, which of the choices correctly constructs a Time(int hours, int minutes, int seconds) object?
AP Computer Science 4.2 Classes and Objects 181 Views
Share It!
Description:
AP Computer Science 4.2 Classes and Objects. Which of the following commands creates an object?
Transcript
- 00:00
Sorry Then here's your shmoop du jour brought to you
- 00:06
by primitive data types Watch out they bite But which
- 00:12
of the following commands creates an object Recall the difference
- 00:20
between primitives and objects Objects can contain many data fields
- 00:24
such as variables and methods Primitives can only contain one
Full Transcript
- 00:28
specific value Remember that we have eight primitive types in
- 00:33
char double bite short long float and billions primitives air
- 00:38
like the less evolved less intelligent versions of objects I've
- 00:42
been the congress lately All right Looking at our potential
- 00:46
answers we can see that some of them create new
- 00:49
it's question asked for objects so we can eliminate choices
- 00:53
and now we can see the choices Dian ear incorrect
- 00:56
de specifies the code that you need to initialize a
- 01:00
string but it's not the complete code for creating one
- 01:03
gone is missing The parentheses at the end that specify
- 01:07
what tax to put in the string is also missing
- 01:10
a semicolon Well that leaves us just with choice Seas
- 01:13
are correct answers Looking closer we can see that it
- 01:17
correctly declares a new string object and fills it with
- 01:20
a value Yeah next time we'll look at the epic 00:01:23.866 --> [endTime] uprising of the evolving mistreated primitives Ah
Related Videos
AP Computer Science 1.2 GridWorld Case Study and APIs. What is the direction of the actor?
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. Which of the following is correct implementation of the Country class?
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. What kind of algorithm is the following?