Answers for "kotlin print an val"

2

kotlin print

fun main() { 
  println("Hello World") 
}
Posted by: Guest on September-08-2021
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