我查了源码,不太清楚,我以为new
只是用来实例化对象的?
mMap.addPolyline(new PolylineOptions().add(startCoords, finalCoords))
最佳答案
I thought new was only used to instantiate objects?
正确。在这里,您将创建一个新的 PolylineOptions
实例。
关于java - 为什么PolyLineOptions()之前有一个 "new"关键字?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43706679/