https://kotlinlang.org logo
#android
Title
# android
g

g_robl

07/19/2019, 9:43 PM
Hello, I am trying to create an instance of a Builder class (
Place.Builder().setLatLong(LatLong(x,y)).build()
) but I get `Cannot create an instance of an abstract class`; Place.Builder is an abstract class in Java.
g

gildor

07/20/2019, 2:07 AM
Well if Place.Builder is abstract you cannot instantiate it, first you need non-abstract child of it, you can use anonymous object for this, but it's really depends on case and it a bit strange API with abstract builder, maybe there is some builder method that create instance of this builder
g

g_robl

07/22/2019, 4:40 PM
yeah that was the case a builder method to creates an instance of the Builder,thanks for replying.