Tara Czutno
06/09/2023, 11:12 PMprivate const val NUM_THREADS = 15
OR
Bottom of the file like:
companion object {
const val RECENT_ACTIVITY_LIMIT = 10
}
Joffrey
06/09/2023, 11:15 PMStefan Oltmann
06/10/2023, 4:13 AMHumphrey
06/10/2023, 6:56 AMpublic static final
way?Charles Flynn
06/10/2023, 8:15 AMJoffrey
06/13/2023, 3:21 PMAnd when you want to access that constant like java in public static final way?I somehow missed this, I guess that was a question for me. In that case I use the companion object (if an existing class makes sense to hold that constant), or I create a standalone
object
with a relevant name to hold the constant(s).Humphrey
06/13/2023, 3:24 PM