Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个点列表,我想使用包含方法。问题是我有下一个 List: {(1,2), (2,3), (2,4)},但是当我问的时候list.contain((2,3)),它给了我错误的信息。
{(1,2), (2,3), (2,4)}
list.contain((2,3))
我用java.awt.Point.
java.awt.Point
如何更改它以支持此问题?
尝试这个:
list.contains(new Point(2,3))