Introduction to Kotlin Programming: IDE Setup, Syntax, and Working with Variables (Val & Var)

preview_player
Показать описание
In this video, we dive into the basics of Kotlin, including:

Installing and setting up IntelliJ IDEA for Kotlin development
Creating your first Kotlin project
Understanding Kotlin syntax, output, and comments
Working with variables, focusing on val and var
Join us as we lay the foundation for your Kotlin programming journey!
Рекомендации по теме
Комментарии
Автор

Here is the notes

package com.myapppublish.helloworld
//package defines the namespace or the package in which the class or files reside
//its away to group related classes together
//it should match the directory structure in your project.
//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon icon in the gutter.
//org.example this would be the package name or the package name the classes or functions are part of
//fun main() {
// println("Hello world")
//println(1233)
//}
//fun is a keyword used to declare a function.
//main() is a function any code inside the {} will be executed
//println("string") is a function inside the main() Function
fun main(args: Array<String>) {
println("Hello world!")
println("Hello KNCMAP-TECHNOLOGIES!")
println("It's a kotlin class")
println(3+3123456723456789)
val pi = 3.14//val can't be modified thus we use it here
var radius = 20//var can be modified radius can be dynamic
var area = pi * radius * radius
println("this is pi: $pi radius: $radius area: $area")
var strings = "string"
println(pi)
println(strings)
var x=12
var y=13
var _uii=900
println(x+y)

}
/*parameters args is a parameter of type Array<String> it's used to pass commandline
arguments to the program */
//Array<String> this means args will hold any string that are passed when you run the program
//print("it\'s a python class")
//multiline comment /* your comment */
//your comment here
// var and val
//var is a variable that can be changed
//val is a variable that can't be changed
//camel case var myNameField = "Goes here"
//pascal case var MyNameField = "Goes here"
//snake Case var my_name_field = "Goes here"
//int, double, char, boolean, string

KNCMAP-TECHNOLOGIES
visit shbcf.ru