I am having a problem. I need something similar to Kotlin's secondary constructor "apply" in Java. Kotlin:
private val paint = Paint(Paint.ANTI_ALIAS_FLAG).apply {
color = Color.YELLOW;
style = Paint.Style.STROKE
strokeWidth = 5.0f
}
I expect something like this in Java:
private Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG).apply{
color = Color.YELLOW
style = Paint.Style.STROKE
strokeWidth = 5.0f
}