title: Kotlin readLine() function not working properly
body: <p>I recently made a simple user input code in kotlin and I tried to run it on intellij Idea, but it didn't work properly, when I ran the code, the &quot;Enter text&quot; part showed up and I can type some words, but the readLine() didn't seem to work as it doesn't continue to the last println statement.</p>
  <p>this is the contents of my <strong>main.kt</strong> file</p>
  <pre><code>fun main(args: Array&lt;String&gt;) {
      print(&quot;Enter text: &quot;)
  
      val stringInput = readLine()!!
      println(&quot;You entered: $stringInput&quot;)
  }
  </code></pre>
  <p>here is the contents of my <strong>build.gradle.kts</strong> file</p>
  <pre><code>import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
  
  plugins {
      kotlin(&quot;jvm&quot;) version &quot;1.4.20&quot;
      application
  }
  
  group = &quot;me.rakandhiya&quot;
  version = &quot;1.0-SNAPSHOT&quot;
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      testImplementation(kotlin(&quot;test-junit&quot;))
  }
  
  tasks.test {
      useJUnit()
  }
  
  tasks.withType&lt;KotlinCompile&gt;() {
      kotlinOptions.jvmTarget = &quot;1.8&quot;
  }
  
  application {
      mainClassName = &quot;MainKt&quot;
  }
  </code></pre>
  <p>is there anything wrong in those 2 files?</p>