How to exit a program in Kotlin

1 Answer

0 votes
import kotlin.system.exitProcess

fun main() {
    println("Before exitProcess(0)")
    
    exitProcess(0)
    
    println("After exitProcess(0)")
}
 
  
/*
run:

Before exitProcess(0)

*/

 



answered Jun 24, 2025 by avibootz
edited Jun 24, 2025 by avibootz

Related questions

1 answer 152 views
152 views asked May 19, 2025 by avibootz
1 answer 83 views
83 views asked Jun 24, 2025 by avibootz
1 answer 88 views
88 views asked Jun 23, 2025 by avibootz
1 answer 85 views
85 views asked Jun 23, 2025 by avibootz
1 answer 93 views
1 answer 84 views
...