Posts

Variables declaration in kotlin

  Var : It is used to declare mutable variable it means it can change the value of variable. Once we declare variable we can change the data of variable . Example: var a=1 In kotlin it is atomatically take datatypes   of the variable . Also, we can specify data type of variable Example: var a:Int =1 Val: It is used to declare Non mutable variable it means it can not change the value of variable. It is work as read only variable. It is same as final keyword in java. Example : Val myname=”kotlin” Lateinit: Iateinit means late initialization . you have to initialize the variable late . If you not initialize the variable than throws exceptions   . Example : lateinit var myname :String

Difference between kotlin and Java .

Kotlin: Kotlin supports Object-oriented and functional programming . There are no Null variables in kotlin . It doesn’t supports implicit conversation. Kotlin does not require to specify data types of variable . Kotlin do not require semicolons. Less chances to crash application. Java: Java supports only limited Object-oriented . Null variables and objects are parts of Java It supports implicit conversation. While java require specify data types of the variable. Java require semicolons. More chances to crash application.

Why Kotlin ?

It is faster than Java. It is Expressive and concise language it is supports to focus on expressing ideas. It provides safer code . because of it helps you to avoid Null pointer Exceptions. In kotlin included @Nullable and @NonNull in its type system. So application less crash . In kotlin code is clean. It is support more features than   java.

What is Kotlin ?

It is programming language   used to develop android application. Kotlin language developed by jet Brains. Kotlin is cross – platform , general purpose programming language . Android application works faster with kotlin. In world 60% of professional android developer used kotlin. Kotlin language helps boosts productivity, code safety supports less code more features . Kotlin is based on JAVA language and depends on the java class library . It use JVM to execute its byte code. Kotlin language is expressive language .

What is Realm Database ?

  Realm is Database that provides cross-platform database solution. Realm is faster then SQLite Database. It is use to store the offline Data in android. It is provides more features than other database. It is easier to Set-up. It replace both SQLite database and ORM libraries in android. It support more features such as JSON, a fluent API, Encryption .

What is SQLite Database ?

SQLite is open source database . It is light weight Database. It is use to store the text file on any device. It is offline database. We can use the the SQLite database to store file in android . We can perform insert update delete view operation in SQLite database. Android     support   cursor to retrieve the database. Android support many method and class for SQLite Database.    

What is Cardview?

Card view is container so we can contain the views  like Imageview , textview , EditText and many more. Card view is  wrap the data with rounded corners , square  corners and shadow . It is same as Frame Layout. Card view is also use in recycleview . It is makes view perfect and attractive.