We can print to console using Kotlin in Android Studio with the help of the log class. Kotlin Print to Console in Android Studio Well, Logcat Window is the Android Studio’s console.Īny message we print to the console is displayed on the Logcat Window. What is the Logcat Windowīefore moving into how to print to console using Kotlin in Android Studio, we need to understand the Logcat Window. So how can we print to console using Kotlin in Android Studio? This article will give you an answer for just that. Using println() in the Android Studio won’t display any message on the console in Kotlin. We use printf() in C, cout in C++, () in Java and println() in Kotlin.īut the Android Studio works a little differently. There are different ways in different languages to print to console. Hence, printing to the console is of utmost importance. How will we know what error has occurred unless we see it on the console? Suppose an error occurs while executing a code. We must display messages on the console to understand what the compiler is doing in the backend. The console is the system’s monitor connected with an input device.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |