Anonymous Quiz
26%
Array(3) { Array(3) { 0 } }
23%
IntArray(3, IntArray(3))
11%
MultiArray<Int>(3,3)
40%
arrayOf(arrayOf(0))
💊3
Anonymous Quiz
67%
Помечает переменные, которые не должны сериализоваться
10%
Помечает временные переменные
17%
Помечает переменные для параллельной обработки
5%
Помечает переменные, которые могут быть изменены
👍1
Ставь 👍 если знал ответ, 🔥 если нет
Забирай 📚Базу Знаний
Please open Telegram to view this post
VIEW IN TELEGRAM
👍2🔥1
Anonymous Quiz
5%
Singleton
64%
Builder
26%
Factory
5%
Prototype
Anonymous Quiz
4%
try { ... } always { ... }
77%
try { ... } finally { ... }
17%
try { ... } catch(e: Exception) { ... } always { ... }
2%
try { ... } then { ... }
Ставь 👍 если знал ответ, 🔥 если нет
Забирай 📚Базу Знаний
Please open Telegram to view this post
VIEW IN TELEGRAM
👍2🔥2
Anonymous Quiz
85%
interface Test { fun check(): Boolean }
8%
interface Test { fun check -> Boolean }
5%
interface Test { fun check() = true }
2%
interface Test { boolean check(); }
Anonymous Quiz
28%
ArrayIndexOutOfBoundsException
67%
IndexOutOfBoundsException
3%
NullPointerException
2%
OutOfMemoryError
Ставь 👍 если знал ответ, 🔥 если нет
Забирай 📚Базу Знаний
Please open Telegram to view this post
VIEW IN TELEGRAM
👍5🔥2
Anonymous Quiz
87%
fun greet(name: String = "World") { ... }
4%
fun greet(name: String?) { ... }
6%
fun greet(name: String = null) { ... }
3%
fun greet(name: String?) = "Hello $name"
Anonymous Quiz
12%
for (int key : map.keySet()) { ... }
20%
for (Map.Entry<Integer, String> entry : map.entrySet()) { ... }
45%
map.forEach((key, value) -> { ... });
23%
while (map.iterator().hasNext()) { ... }
Ставь 👍 если знал ответ, 🔥 если нет
Забирай 📚Базу Знаний
Please open Telegram to view this post
VIEW IN TELEGRAM
👍3🔥2
Anonymous Quiz
9%
Их hashCode должны быть разными.
33%
Их hashCode могут быть разными.
51%
Их hashCode должны быть одинаковыми.
6%
Отношения hashCode не регулируются.
Anonymous Quiz
11%
val result = str1.plus(str2)
46%
val result = "$str1$str2"
19%
val result = str1.concat(str2)
24%
val result = str1.append(str2)
Ставь 👍 если знал ответ, 🔥 если нет
Забирай 📚Базу Знаний
Please open Telegram to view this post
VIEW IN TELEGRAM
👍5🔥1
Anonymous Quiz
44%
val myVar by lazy(LazyThreadSafetyMode.SYNCHRONIZED) { computeValue() }
46%
val myVar by lazy { computeValue() }
6%
lazy val myVar = { computeValue() }
4%
val myVar: Lazy<Int> = lazy { computeValue() }
Anonymous Quiz
87%
Объявить класс как final
6%
Объявить все методы класса как private
6%
Использовать модификатор sealed
1%
Использовать @Final аннотацию
Ставь 👍 если знал ответ, 🔥 если нет
Забирай 📚Базу Знаний
Please open Telegram to view this post
VIEW IN TELEGRAM
💊4🔥2😁1
Anonymous Quiz
52%
replace(int index, E element)
29%
set(int index, E element)
6%
update(int index, E element)
12%
put(int index, E element)
Anonymous Quiz
70%
val result = when (x) { 1 -> "one"; 2 -> "two"; else -> "unknown" }
17%
val result = when (x) { 1 -> return "one" 2 -> return "two" else -> return "unknown" }
3%
val result = when (x) { 1: "one", 2: "two", else: "unknown" }
10%
val result = when { x == 1 -> "one" x == 2 -> "two" else -> "unknown" }