int cannot be dereferenced error

后端 未结 1 814
悲哀的现实
悲哀的现实 2020-12-22 13:30

I have the int cannot be dereferenced error in the below code where I have //error is here. I\'m confused because the variable b is used to reference a spot in the empl arr

相关标签:
1条回答
  • 2020-12-22 14:13

    getEmployeeNumber() apparently returns an int.

    int is a primitive type, not an object.
    Therefore, you cannot call methods like compareTo() on it.

    0 讨论(0)
提交回复
热议问题