Misconception: Students have difficulty using the correct data types in Java because their go-to data type is int most of the time.

  • Students consistently get compilation errors for declaring a variable as an int that should actually be holding an object.
    • int x = "cat";
  • It seems like this happens because students aren’t paying enough attention to the type of the variables.
  • This misconception was experienced in an objects-later AP CS course and might be less likely with an objects-first curriculum approach.

More about this tip

External Source

Interview with Brandon R. Rodriguez