I can't quite understand what this syntax is: ``` ...
# android
w
I can't quite understand what this syntax is:
Copy code
private val surfaceTextureListener = object : TextureView.SurfaceTextureListener {

        override fun onSurfaceTextureAvailable(texture: SurfaceTexture, width: Int, height: Int) {
        //...
    }
g
It’s creation of object
like creation of anonymous class in Java
w
Aw man, I never got that far with Java. Only basic classes.
g
Java analogue would be:
Copy code
new TextureView.SurfaceTextureListener {
   @Override
   void  onSurfaceTextureAvailable(…)
}
w
Can you link me to relevant kotlin docs that might give me more insight
w
Wonderful thank you for your help sir