جافا Java
6.46K subscribers
212 photos
18 videos
81 files
269 links
ليس عيبًا ألا تعرف شيئًا، ولكن العيب انك لا تريد أن تتعلم
Download Telegram
How do you initialize an array of 10 integers to zero in Java?

كيف تقوم بتهيئة مصفوفة من 10 أعداد صحيحة إلى صفر في جافا؟
What will be the output of the following Java code snippet?
```java
int x = 10; int y = ++x; System.out.println(y); ```
Anonymous Quiz
12%
10
80%
11
3%
12
5%
None of the above
What is the difference between 'abstract class' and 'interface' in Java?

ما هو الفرق بين 'الفئة المجردة' و'الواجهة' في جافا؟
👍1
In Java, how do you check if an object `obj` is an instance of the class `MyClass`?
Anonymous Quiz
22%
obj instanceof MyClass
31%
MyClass.isInstance(obj)
17%
instanceof(obj, MyClass)
30%
obj.instanceof(MyClass)
👍1
What is an infinite loop, and how can it be caused in Java?

ما هو الحلقة اللانهائية، وكيف يمكن أن تسبب في جافا؟
What is the purpose of garbage collection in Java, and how does it work?

ما هو الغرض من جمع القمامة في جافا، وكيف يعمل؟
1👍1
Which of these keywords is used to define a variable that cannot be modified?
Anonymous Quiz
11%
fixed
54%
final
25%
static
11%
const
Describe the concept of 'method overloading' in Java.

وصف مفهوم 'تحميل الطريقة' في جافا.
How do you access the length of an array named `arr` in Java?
Anonymous Quiz
53%
arr.length()
2%
arr.size
40%
arr.length
5%
length(arr)
What is the purpose of a constructor in a Java class?

ما هو الغرض من منشئ في فئة جافا؟
Which of the following loops will run indefinitely in Java?
Anonymous Quiz
14%
for (;;) {}
14%
while (true) {}
14%
do {} while (true);
59%
All of the above
Fix the error in the following Java method that is supposed to calculate the factorial of a number:
 public int factorial(int n) {
if (n == 0) {
return 1;
} else {
return n * factorial(n);
}
}


أصلح الخطأ في الطريقة الجافا التالية المفترض أن تحسب عامل رقم:
 public int factorial(int n) {
if (n == 0) {
return 1;
} else {
return n * factorial(n);
}
}
1👍1🎉1
What is the correct way to compare two strings for equality in Java?
Anonymous Quiz
17%
string1 == string2
47%
string1.equals(string2)
18%
string1.compareTo(string2)
17%
string1.equal(string2)
2
This media is not supported in your browser
VIEW IN TELEGRAM
طريقة عمل مشروع javafx اذا ال jdk عندك اعلى من 8 بطريقة مباشرة في النتبينز
2
Which of the following is the correct way to create a multidimensional array in Java?
Anonymous Quiz
74%
int[][] arr = new int[10][10];
12%
int arr[][] = new int[10,10];
9%
int arr[10][10];
5%
int[][] arr = new int[10];
What is the use of the 'new' keyword in Java?

ما هو استخدام كلمة 'new' في جافا؟
Which of these is not a loop structure in Java?
Anonymous Quiz
10%
for
19%
foreach
7%
do-while
64%
repeat
Write a Java program to print all the elements of a two-dimensional integer array named 'matrix'.

اكتب برنامج جافا لطباعة جميع عناصر مصفوفة ثنائية الأبعاد من الأعداد الصحيحة باسم 'matrix'.
Which of the following is an unchecked exception in Java?
Anonymous Quiz
27%
IOException
15%
FileNotFoundException
32%
NullPointerException
25%
SQLException