Integer type not working as expected (Java)

前端 未结 1 1503
慢半拍i
慢半拍i 2021-01-26 07:03

I\'m writing one of my first programs dealing with generics and standard OOP principles in Java, however I am running into a bit of a problem when dealing with the Integer type.

相关标签:
1条回答
  • 2021-01-26 07:27

    According to the error message BinarySearchTree has a type parameter called Integer which shadows the standard type java.lang.Integer.

    Just remove the type parameter in both classes, i.e.

    class IntgS { ... }
    
    0 讨论(0)
提交回复
热议问题