title: Create an instance of an abstract class in Kotlin
body: <p>I'm new to Kotlin and I'm trying to use it in my Android project. I have this code:</p>
  <pre><code>public var oneTouchTimer: CountDownTimer = CountDownTimer(500, 100) {
      override fun onTick(l: Long) {
  
      }
  
      override fun onFinish() {
  
      }
  }
  </code></pre>
  <p>And it's throwing the error:</p>
  <pre><code>Cannot create an instance of an abstract class.
  </code></pre>
  <p>Basically I'm trying to create an instance of CountDownTimer and cannot figure out how to convert it to Kotlin.</p>
  <p>Here is the code in Java:</p>
  <pre><code>CountDownTimer oneTouchTimer = new CountDownTimer(500, 100) {
      @Override
      public void onTick(long l) {
  
      }
  
      @Override
      public void onFinish() {
  
      }
  };
  </code></pre>