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 253 views
253 views asked May 19, 2025 by avibootz
1 answer 183 views
183 views asked Jun 24, 2025 by avibootz
1 answer 181 views
181 views asked Jun 23, 2025 by avibootz
1 answer 168 views
168 views asked Jun 23, 2025 by avibootz
1 answer 172 views
1 answer 173 views
...