Skip to content

Commit 2a10d02

Browse files
authored
Merge pull request #953 from Kayuemkhan/develop
Updated kotlin language file
2 parents 1e28683 + 8bf126d commit 2a10d02

1 file changed

Lines changed: 90 additions & 1 deletion

File tree

data/kotlin.json

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,33 @@
5353
{
5454
"definition": "ক্যারেকটার",
5555
"code": "val c: Char = ‘s’"
56+
},
57+
{
58+
"definition": "বহু লাইনের স্ট্রিং যুক্তকরন",
59+
"code": "val text = \"\"\"\n|First Line\n|Second Line\n|Third Line \"\"\".trimMargin()"
60+
},
61+
{
62+
"definition": "সাব স্ট্রিং করুন",
63+
"code": "substr = str.substring(8..13)"
5664
}
65+
66+
67+
5768
]
5869
},
5970
{
6071
"title": "কন্ট্রোল ফ্লো",
61-
"items": [{
72+
"items": [
73+
{
6274
"definition": "সাধারন if-else",
6375
"code": "if(condition) { ... } else { ... }"
6476
},
77+
78+
{
79+
"definition": "মাল্টিপল কন্ডিশন ",
80+
"code": "if (score in 0..1000) { }"
81+
},
82+
6583
{
6684
"definition": "when যেটি গতানুগতিক switch এর বিকল্প হিসেবে ব্যাবহার করা হয়",
6785
"code": "when (x) {\n 1 -> print(\"x == 1\")\n 2 -> print(\"x == 2\")\n else -> {\n print(\"x is neither 1 nor 2\")\n }\n}"
@@ -94,6 +112,77 @@
94112
"definition": "লেট স্কোপ ফাংশন ,নাল চেক করার জন্য ",
95113
"code": " mediaString?.let { media ->\n\t//do your opeartion you want to do on mediaString object.But use \"media\" in stead of mediaString. It is an alternative of \"if(mediaString != null){}\" in java\n}"
96114
}]
115+
},
116+
117+
{
118+
"title": "টারনারি অপারেশনস",
119+
"items": [ {
120+
"definition": "টারনারি অপারেশন ",
121+
"code": "val numOfTypes = if (x > 5) x > 5 else x <= 5"
122+
}]
123+
},
124+
{
125+
"title": "বিটওয়াইজ অপারেশনস",
126+
"items": [
127+
{
128+
"definition": "এন্ড অপারেশন ",
129+
"code": "val andResult = a and b"
130+
},
131+
{
132+
"definition": "অর অপারেশন ",
133+
"code": "val orResult = a or b"
134+
},
135+
{
136+
"definition": "এক্স অর অপারেশন ",
137+
"code": "val orResult = a xor b"
138+
},
139+
{
140+
"definition": "রাইট শিফট ",
141+
"code": "a shr 2"
142+
},
143+
{
144+
"definition": "লেফট শিফট ",
145+
"code": "a shl 2"
146+
},
147+
{
148+
"definition": "আনসাইনড রাইট শিফট ",
149+
"code": "a ushr 2"
150+
}
151+
152+
]
153+
},
154+
{
155+
"title": "টাইপ চেক এবং কাস্টিং",
156+
"items": [
157+
{
158+
"definition": "টাইপ চেক ",
159+
"code": "var age = object as? AgeData // var age = object as AgeData?"
160+
},
161+
{
162+
"definition": "টাইপ চেক ( implicit ) ",
163+
"code": "if ( object is age ) { var age = object } // smart casting"
164+
}
165+
166+
]
167+
},
168+
{
169+
"title": "আর্গুমেন্ট পাস ও মেথড ডাটা রিটার্ন ",
170+
"items": [
171+
{
172+
"definition": "ভ্যারয়েবল নাম্বার অফ আর্গুমেন্টস ",
173+
"code": "fun doSomething(vararg numbers: Int) { }"
174+
},
175+
{
176+
"definition": "সিঙ্গেল এক্সপ্রেশন ফাংশন ",
177+
"code": "fun getAge(): Int = age "
178+
},
179+
{
180+
"definition": "সিঙ্গেল এক্সপ্রেশন ফাংশন আরো সিম্পলভাবে",
181+
"code": "fun getAge() = age // return-type is Int "
182+
}
183+
184+
]
97185
}
186+
98187
]
99188
}

0 commit comments

Comments
 (0)