bootcamper bootcamper SetUp Docs Reps Blog
bootcamper bootcamper

U2L11 - equals

This lesson drills what Trevor teaches in U2L11

Pre-requirements:

  • You have performed each of previous drills to reach a top speed, and then repeated top speed 10x
  • Follow this for all drills explainer
  • Or this if you haven't even installed the drills yet installation

Summary of what is drilled

A Disciplined Approach? holds that these items should never again allow any confusion in your mind about this list of what Trevor covered in this lesson:

COVERED IN THE LESSON

  • duh: does not enter blocks of code where condition doesn't pass
  • cannot use == on objects
  • dot properties
  • .equals()
  • identical primitives share the same memory location
  • objects share unique memory locations

Instructor Administered Test

  • Create a new project
  • Create a new package
  • Create a new class with a new public static void main method
  • declare and assign an int variable named speed and assign to it the value 10
  • declare and assign an String variable named caution and assign to it the value "10"

write code that prints

  • if you have an speed of 10 then you are fast,
  • if you have a caution of "10" then you are safe