جافا Java
Open in Telegram
ليس عيبًا ألا تعرف شيئًا، ولكن العيب انك لا تريد أن تتعلم
Show more6 336
Subscribers
-224 hours
-127 days
-5530 days
Posts Archive
6 335
❓ كيف يعمل fall-through عندما يطابق case 1؟
How does fall-through work here?
int d = 1;
switch (d) {
case 0: d += 2;
default: d += 3;
case 1: d += 4;
}
System.out.println(d);6 335
❓ كم عدد الزيادات؟
How many increments occur?
int c = 0;
for (int i = 0; i < 3; i++) {
for (int j = 0; j <= i; j++) {
c++;
}
}
System.out.println(c);6 335
❓ تأثير i++ داخل شرط while؟
Effect of i++ in while condition?
int i = 0;
while (i++ < 3) { }
System.out.println(i);6 335
❓ تمرير المصفوفات للميثود: ماذا يُطبع؟
Passing arrays to methods: what prints?
void change(int[] arr) {
arr[0] = 99;
arr = new int[]{7,7,7};
}
int[] x = {1,2,3};
change(x);
System.out.println(x[0]);6 335
❓ Switch على String بدون break بعد "two"؟
Switch on String (no break after "two")?
String s = "two";
switch (s) {
case "one": System.out.print(1); break;
case "two": System.out.print(2);
default: System.out.print(0);
}6 335
❓ هل a == b صحيح؟
Is a == b true?
String a = new String("hi");
String b = "hi";
System.out.println(a == b);6 335
❓ ما قيمة count بعد استخدام continue؟
What is count after using continue?
int count = 0;
for (int i = 0; i < 5; i++) {
if (i % 2 == 0) continue;
count += i;
}
System.out.println(count);6 335
❓ هل يعدّل for-each عناصر المصفوفة؟
Does for-each modify elements?
int[] a = {1, 2, 3};
for (int x : a) { x *= 2; }
System.out.println(a[1]);6 335
❓ كيف تطبع طول المصفوفة؟
How do you print the array length?
int[] a = {1, 2, 3, 4};
System.out.println( /* ? */ );6 335
❓ أي overload يُستدعى؟
Which overload is invoked?
void print(int x) { System.out.println("int"); }
void print(Integer x) { System.out.println("Integer"); }
Integer n = null;
print(n);6 335
Repost from قهوة مبرمجين
لو تشتغل على جافا، أنصحك تقرأ آخر إصدار من كتاب “Troubleshooting Java”.
الكتاب مليان أشياء عملية: من أفضل ممارسات الـdebugging، إلى الـlogging، الـtracing، الـtelemetry، نموذج الذاكرة في جافا، منع الـdeadlocks، وكمان الـprofiling والـsampling.
قراءة ممتازة لو تحب تفهم وش يصير تحت غطاء الـJVM وكيف تلاقي المشاكل بسرعة في الإنتاج.
Available now! Telegram Research 2025 — the year's key insights 
