forked from devsonket/devsonket.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkotlin.json
More file actions
99 lines (99 loc) · 4.92 KB
/
kotlin.json
File metadata and controls
99 lines (99 loc) · 4.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
"id": "kotlin",
"title": "কটলিন প্রোগ্রামিং",
"slug": "kotlin",
"description": "কটলিন একটি ক্রস-প্লাটফর্ম, স্টাটিকালি টাইপ প্রোগ্রামিং ল্যাংগুয়েজ। এটি পুরোপুরি জাভা ভার্চুয়ার মেশিন (JVM) এর উপর ভিত্তি করে ডিজাইন করা হয়েছে। ২০১৮ সালে Google I/O ইভেন্টে গুগল অফিশিয়ালি এন্ড্রয়েড ডেভেলপমেন্ট এর অফিসিয়াল ল্যাংগুয়েজ হিসেবে কটলিনকে ঘোষণা দেয়। এই Cheat-Sheet এর মাধ্যমে কটলিন এর দৈনন্দিন প্রয়োজনীয় টপিকগুলোকে হাইলাইট করা হয়েছে।",
"colorPref": "#F68305",
"contents": [{
"title": "ভ্যারিয়েবল ও ডেটা টাইপ",
"items": [{
"definition": "একবার মান সেট করলে আর পরিবর্তন করা যায়না",
"code": "val"
},
{
"definition": "মান পরিবর্তনযোগ্য",
"code": "var"
},
{
"definition": "৮-বিট",
"code": "Byte"
},
{
"definition": "১৬-বিট",
"code": "Short"
},
{
"definition": "৩২-বিট",
"code": "Int"
},
{
"definition": "৬৪-বিট",
"code": "Long"
},
{
"definition": "৩২-বিট",
"code": "Float"
},
{
"definition": "৬৪-বিট",
"code": "Double"
}
]
},
{
"title": "স্ট্রিং ও ক্যারেকটার",
"items": [{
"definition": "সিঙ্গেল লাইন স্ট্রিং",
"code": "val singleLine: String = “Hello World”"
},
{
"definition": "বহু লাইনের স্ট্রিং",
"code": "val multiLines: String = \"\"\"Multi Line\"\"\""
},
{
"definition": "ক্যারেকটার",
"code": "val c: Char = ‘s’"
}
]
},
{
"title": "কন্ট্রোল ফ্লো",
"items": [{
"definition": "সাধারন if-else",
"code": "if(condition) { ... } else { ... }"
},
{
"definition": "when যেটি গতানুগতিক switch এর বিকল্প হিসেবে ব্যাবহার করা হয়",
"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}"
},
{
"definition": "for loop গতানুগতিক foreach এর মত করে কাজ করে",
"code": "for (item in collection) print(item)"
},
{
"definition": "for loop গতানুগতিক foreach এর মত করে কাজ করে",
"code": "for (item in collection) print(item)"
}
]
},
{
"title": "ফাংশন",
"items": [{
"definition": "সাধারন ফাংশন",
"code": "fun simpleFunc() { println(“Hello World”) }"
},
{
"definition": "এক লাইনের ফাংশন",
"code": "fun singleLineFunc() = println(“Hello World”) "
}
]
},
{
"title": "স্কোপ ফাংশন",
"items": [{
"definition": "লেট স্কোপ ফাংশন ,নাল চেক করার জন্য ",
"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}"
}]
}
]
}