☃️Howdy-ho Devfolks!!!
GDSC MESCOE is elated to have you get started with Android study jam using Kotlin the language of the future at our campus.略
Become an android developer. Learn how to build Android apps and the basics of kotlin with the GDSC MESCOE Team.
Date - 15 and 16 December, 2021
Time - 2pm to 4 pm
Venue - Room No. 309
❄️This is just a start though, after which there will be plenty of opportunities.
Key perks -
❄️ Make an app of your own
❄️ Earn badges from Google
❄️ Get to meet other developers like you and build contacts
❄️ Hands-on session from experienced android developers.
❄️ Fun games, prizes, Kahoot, and whatnot!!!略
Vector Search -An Introduction in Oracle Database 23ai.pptx
Kotlin programming language
1. This work is licensed under the Apache 2.0 License
Kotlin Programming Language
Welcome to Android
Study Jams
Wi-Fi : Super1@dmin
2. This work is licensed under the Apache 2.0 License
3. Comments
Print Statement
The println() or print() function is used to output values/text.
SYNTAX :- print(“Welcome”)
println(“To The ASJ”)
Comments can be used to explain Kotlin code, and to make it more readable. It can also be used
to prevent execution when testing alternative code.
SYNTAX :- // This is how you write single line comments.
/* This is how you write multi-line comments. */
4. Variables
The general rule for Kotlin variables are:
● Names can contain letters, digits, underscores, and dollar signs
● Names should start with a letter
● Names can also begin with $ and _
● Names are case sensitive ("myVar" and "myvar" are different variables)
● Names should start with a lowercase letter and it cannot contain whitespace
● Reserved words (like Kotlin keywords, such as var or String) cannot be used as names
Variables are containers for storing data values.
SYNTAX :- var variableName = value
val variableName = value
5. Data Types
Different Types of data types are:
● Int (For Numbers)
● Double (For Decimal Numbers)
● Char (For Letters)
● Boolean (For True Or False)
● String (For a series of Characters)
myNum = 5
myDoubleNum = 10.
myLetter = ‘K’
myBoolean = true
myString = “Hello”
7. Conditional Statements
● Use if to specify a block of code to be executed, if a specified condition
is true
● Use else to specify a block of code to be executed, if the same
condition is false
● Use else if to specify a new condition to test, if the first condition is
false
● Use when to specify many alternative blocks of code to be executed
SYNTAX :- if(condition){
// if condition is true execute
}
8. Loops
A Do While loop will execute the code block once, before checking the
condition is true, then it will repeat the loop until it’s true.
SYNTAX :- do{
Code block to be executed
}
while(condition)
A While loop loops through a code as long as a specified condition is true.
SYNTAX :- while(condition){
Code block to be executed
}
9. Loops
A For loop loops through a array, ranges and other things that contains
a specific number of elements.
SYNTAX :- for(condition){
Code block to be executed
}
Ranges
Ranges are a special way to represent a sequence of numbers.
We use “..” operator to use a range
10. Arrays
● Array Slicing Operations
● Length/Size
● Loop through a Array
Arrays are used to store multiple values in a single variable, instead
of creating separate variables for each value.
SYNTAX :- val cars = arrayOf(“Ford”,”BMW”,”Volvo”)
11. Function
A function is a block of code which only runs when it is called. You
can pass data, known as parameters, into a function.
SYNTAX :- fun functionName(){
//Code to be executed
}
Fun functionName():Int{
//Code to be executed
}