Question: You are upgrading a Java class to Kotlin. What should you use to replace the Java class's static fields?

  1. an anonymous object
  2. a static property
  3. a companion object
  4. a backing field

Answer: The correct answer of the above question is Option C:a companion object