Answers for "kotlin print statement"

1

kotlin print statement

//Kotlin print statement

//print on its own line
println("Hello world")
  
//regular print statement, will go on top of last line
print("Hello world")
Posted by: Guest on October-08-2020
0

how to print in kotlin

//Kotlin is a very special coding language
//In order to print it needs a main function or else the code will error
//I did this in vs code without a function and it reacted weirdly giving a bunch of error lines

fun main(args: Array<String>) {

println("Hello Bob")

}

//you can print in two ways!
println("hi world")
    print("hello print")


/*
In vs code I did fun main(){

}

And it worked great!
*/
Posted by: Guest on July-26-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language