جافا Java
Kanalga Telegram’da o‘tish
ليس عيبًا ألا تعرف شيئًا، ولكن العيب انك لا تريد أن تتعلم
Ko'proq ko'rsatish6 181
Obunachilar
Ma'lumot yo'q24 soatlar
-177 kunlar
-6830 kunlar
Postlar arxiv
6 179
❓ الاستثناءات المُتَحَقَّقة (Checked)
Checked exceptions handling
void read() throws java.io.IOException {}
void m(){ read(); }6 179
❓ التعامل مع الاستثناءات في finally
Try-catch-finally order
try {
int x = 1 / 0;
System.out.print("A");
} catch (ArithmeticException e) {
System.out.print("B");
} finally {
System.out.print("C");
}6 179
❓ الوراثة مع مُنشئ أب مُعَلَّم
Inheritance with parameterized base constructor
class Base { Base(int x) {} }
class Child extends Base { }6 179
❓ ماذا يطبع جمع عناصر ArrayList؟
What does this ArrayList code print?
import java.util.*;
List<Integer> xs = new ArrayList<>();
xs.add(1);
xs.add(2);
System.out.println(xs.get(0) + xs.get(1));6 179
❓ أي عبارة صحيحة عن String و StringBuilder؟
Which is true about String vs StringBuilder?
6 179
❓ equals مقابل == مع السلاسل
equals vs == with Strings
String s1 = new String("java");
String s2 = new String("java");
System.out.println(s1.equals(s2) + "," + (s1 == s2));6 179
❓ instanceof مع الوراثة
instanceof with inheritance
class A {}
class B extends A {}
A x = new A();
System.out.println(x instanceof B);6 179
❓ تعدد الأشكال (Polymorphism)
Polymorphism dispatch
class A { String f(){ return "A"; } }
class B extends A { String f(){ return "B"; } }
A x = new B();
System.out.println(x.f());