en
Feedback
جافا Java

جافا Java

Open in Telegram

ليس عيبًا ألا تعرف شيئًا، ولكن العيب انك لا تريد أن تتعلم

Show more
6 285
Subscribers
No data24 hours
-177 days
-7130 days
Posts Archive
Choose your answer:
Anonymous voting

❓ كم عدد الزيادات؟ 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);

Choose your answer:
Anonymous voting

❓ تأثير i++ داخل شرط while؟ Effect of i++ in while condition?
int i = 0;
while (i++ < 3) { }
System.out.println(i);

Choose your answer:
Anonymous voting

❓ تمرير المصفوفات للميثود: ماذا يُطبع؟ 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]);

Choose your answer:
Anonymous voting

❓ 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);
}

Choose your answer:
Anonymous voting

❓ هل a == b صحيح؟ Is a == b true?
String a = new String("hi");
String b = "hi";
System.out.println(a == b);

Choose your answer:
Anonymous voting

❓ ما قيمة 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);

Choose your answer:
Anonymous voting

❓ هل يعدّل for-each عناصر المصفوفة؟ Does for-each modify elements?
int[] a = {1, 2, 3};
for (int x : a) { x *= 2; }
System.out.println(a[1]);

Choose your answer:
Anonymous voting

❓ كيف تطبع طول المصفوفة؟ How do you print the array length?
int[] a = {1, 2, 3, 4};
System.out.println( /* ? */ );

Choose your answer:
Anonymous voting

❓ أي 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);

Choose your answer:
Anonymous voting

❓ ما ناتج السويتش بدون break؟ What is the output (no breaks before case 3)?
int n = 2;
switch (n) {
  case 1: System.out.print('A');
  case 2: System.out.print('B');
  case 3: System.out.print('C'); break;
  default: System.out.print('D');
}

جافا Java - Statistics & analytics of Telegram channel @here_java