Skip to main content

कॉटलीन मधील कि-वर्ड आणि ऑपरेटर्स

 कॉटलीन दोन प्रकारचे किवर्ड आहेत

१. हार्ड किवर्ड - हे असे किवर्ड असतात ज्यांचा उपयोग ते कि वर्ड ज्या कामासाठी वापरले जातात ते सोडून प्रोग्रॅम मध्ये इतर ठिकाणी करता येत नाही.

२. सॉफ्ट किवर्ड - हे असे कि वर्ड असतात कि त्यांचा कॉन्टेक्स सोडून ते प्रोग्रॅम मध्ये इतर ठिकाणी आडेंटिफायर
 म्हणून वापरता येतात.

var try : Int //error hard keyword can not be used for variable name
var catch : Int; //not got error we can use it as variable name
catch = 10
print("value of catch : $catch")
//got output : value of catch : 10



Hard Keywords

Soft Keywords

The following tokens act as keywords in the context when they are applicable and can be used as identifiers in other contexts:

Modifier Keywords

The following tokens act as keywords in modifier lists of declarations and can be used as identifiers in other contexts:

Special Identifiers

The following identifiers are defined by the compiler in specific contexts and can be used as regular identifiers in other contexts:

Operators and Special Symbols

Kotlin supports the following operators and special symbols:

Comments

Popular posts from this blog

डिफॉल्ट arguments function

सिम्पल क्लास example

कॉटलीन डेटाटाइप