Android Developers
Kanalga Telegram’da o‘tish
Here You Can Get Android App Development Tutorials For Free LinkTree https://linktr.ee/androiddeveloperspage Contact Me @androiddevstutorialscommentbot
Ko'proq ko'rsatish808
Obunachilar
Ma'lumot yo'q24 soatlar
+167 kun
+15630 kun
Postlar arxiv
var Username = "Biruk" //String
var Age = 20 //Integer
var Height = 1.63 //Double
var isProgrammer = true //Boolean
//In Koltin println Method Is Used To Print Output To The Console Like Java System.out.println();
println(Username) //Print Username
println(Age) //Print Age
println(Height) //Print Height
println(isProgrammer) //Print isProgrammer
}Types Of Variables
Mutable Variables :- A mutable variable is a type of variable whose value can be changed after it has been initialized. This is in contrast to immutable variables, which cannot be changed once they are assigned a value. In programming, mutable variables are often used when you need to update or modify data throughout the execution of a program.
Immutable Variables :- Immutable variables are variables whose values cannot be changed after they are initialized. Once assigned a value, it cannot be altered. This property ensures that the variable's value remains constant throughout the program's execution. Immutable variables are commonly used in functional programming languages and in scenarios where data integrity and consistency are crucial.
👉 @androiddevstutorials
This Is The First Tutorial On How To Install & Use Kotlin In Android By Android Developers Telegram Channel In 2024.
👉 @androiddevstutorials
If Your Program Doesn't Have Any Compilation Error It Show You The Output Like This.
Before Executing This Command Let's Take A Quick Look On It's Pattern.
Main.kt :- Is The Kotlin File Which I Want To Compile.
Main.jar :- Is The Compiled Archive File Name Of My Kotlin File.
After Creating The Program Save It With Any Name You Want With .kt Extension. For Instance My Kotlin File Name Is Main.kt.
Now Back To Termux & Navigate To The Directory Where You Save Your Kotlin File With The cd Command. I Save My Kotlin File In My SD Card So I Will Use This Command.
cd /sdcard/
After Navigating The Directory Type This Command To Compile Your Kotlin File To JAR(Java Archive File).But If You Prefer To Use Kotlin In Command Line Using Termux Follow The Following Steps.
Step1. As I Tell You Earlier Kotlin Runs On JVM(Java Virtual Machine) So We Need To Install A Package Called JDK (Java Development Kit) Before Installing Kotlin. So Use The Following Commands To Install The JDK.
pkg install openjdk-17
After Installing JDK You Can Install Kotlin Compiler Using The Following Command.
pkg install kotlin
After Installing Both Of Them You Can Verify If Kotlin Is Installed Correctly Or Not Using The Following Command.
kotlin -version
If It Installed Correctly It Would Print The Version Like This.
Kotlin version 1.9.23-release-779 (JRE 17-internal+0-adhoc..src)
After Installing Kotlin Let's Create Our First Kotlin Program. For Instance I Have Created This Program.How To Install & Use Kotlin In Android
Kotlin Is A Modern, Statically-Typed Programming Language That Runs On The Java Virtual Machine (JVM). It's Known For Its Concise Syntax, Safety Features, And Interoperability With Existing Java Code. Kotlin Is Often Used For Developing Android Apps, Server-Side Applications, And More.
We Have Two Ways To Use Kotlin In Android. The First One Is To Use Termux To Install Kotlin Compiler & Execute Code In The Terminal & See The Output There.
The Second One Is Using An Android IDE That Supports Kotlin. There May Be Some Alternatives But The One I Prefer Is Cosmic IDE. Which Is The Best IDE To Learn Java & Kotlin By Writing The Code In The Editor, Compile It & See The Output Easily Which You Can Install It From Here.
https://t.me/tapswap_bot?start=r_5720084879
🎁 +2.5k Shares as a first-time gift
