What does the 'static' keyword in Java mean?
A) The variable or method is shared among all instances of the class
B) The variable or method is only accessible within the class it is declared
C) The variable or method can be overwritten in a subclass
D) None of the above
ترجمة السؤال:
ماذا يعني الكلمة المفتاحية 'static' في جافا؟
أ) المتغير أو الدالة مشتركة بين جميع النماذج من الفئة
ب) المتغير أو الدالة يمكن الوصول إليها فقط داخل الفئة التي تم فيها الإعلان
ج) يمكن أن يتم الكتابة فوق المتغير أو الدالة في فئة فرعية
د) لا شيء من ما سبق
A) The variable or method is shared among all instances of the class
B) The variable or method is only accessible within the class it is declared
C) The variable or method can be overwritten in a subclass
D) None of the above
ترجمة السؤال:
ماذا يعني الكلمة المفتاحية 'static' في جافا؟
أ) المتغير أو الدالة مشتركة بين جميع النماذج من الفئة
ب) المتغير أو الدالة يمكن الوصول إليها فقط داخل الفئة التي تم فيها الإعلان
ج) يمكن أن يتم الكتابة فوق المتغير أو الدالة في فئة فرعية
د) لا شيء من ما سبق
🔥2
جافا Java
كم تحبون عدد الأسئلة تكون بالبيوم بحيث مايكون ازعاج او قليل
مجهز لكم اشياء احترافية 🔥
بس اتمنى تتفاعلون علشان احس انه في اهتمام للي جالس اسويه ممكن تنشروا الرابط
https://t.me/learn_java_s
بس اتمنى تتفاعلون علشان احس انه في اهتمام للي جالس اسويه ممكن تنشروا الرابط
https://t.me/learn_java_s
Telegram
جافا Java
سر نجاح المبرمجين هو الاستمرارية. عندما تواجه تحديات، استمر في العمل، وعندما تحقق إنجازات، استمر في التعلم.
❤4👍4🔥2❤🔥1
Write a Java method named 'add' that takes two integers as parameters and returns their sum.
اكتب طريقة جافا بأسم 'add' تأخذ عددين صحيحين كمعاملات وترجع مجموعهم.
اكتب طريقة جافا بأسم 'add' تأخذ عددين صحيحين كمعاملات وترجع مجموعهم.
جافا Java
Write a Java method named 'add' that takes two integers as parameters and returns their sum. اكتب طريقة جافا بأسم 'add' تأخذ عددين صحيحين كمعاملات وترجع مجموعهم.
الأسئلة من اليوم بتكون منوعه بين السهل والصعب والمتوسط وانوع مختلفه مثلا اكتب الكود واختار الاجابه الصحيحه.......
خلينا نشوف ابداعكم🔥
خلينا نشوف ابداعكم
Please open Telegram to view this post
VIEW IN TELEGRAM
👍7❤3🔥2
Which of these is not a valid Java access modifier?
Anonymous Quiz
19%
public
13%
protected
56%
transient
12%
private
👍3❤1🔥1
Which method signature correctly overrides the 'equals' method inherited from 'Object' class in Java?
Anonymous Quiz
40%
public boolean equals(Object obj)
14%
public boolean equals()
18%
public void equals(Object obj)
29%
public boolean equals(Object obj, Object obj2)
Determine the output of this Java code:
حدد مخرجات هذا الكود الجافا:
int[] numbers = {1, 2, 3, 4, 5};
for (int i = numbers.length - 1; i >= 0; i--) {
System.out.print(numbers[i] + "");
} حدد مخرجات هذا الكود الجافا:
int[] numbers = {1, 2, 3, 4, 5};
for (int i = numbers.length - 1; i >= 0; i--) {
System.out.print(numbers[i] + "");
}In a Java program, how do you safely stop a thread?
Anonymous Quiz
49%
By calling the stop() method on the thread
20%
By using a boolean flag to control the execution of the thread
9%
By calling the interrupt() method on the thread
22%
By setting the thread to null
Which of the following is not an OOP concept in Java?
Anonymous Quiz
7%
Inheritance
12%
Encapsulation
11%
Polymorphism
70%
Compilation
❤3
In Java, what is a 'package' and how is it used?
في جافا، ما هو 'الحزمة' وكيف يتم استخدامها؟
في جافا، ما هو 'الحزمة' وكيف يتم استخدامها؟
Which of the following is a correct way to instantiate an object in Java?
Anonymous Quiz
12%
ClassName objectName = ClassName();
79%
ClassName objectName = new ClassName();
4%
new ClassName objectName;
5%
ClassName objectName = create ClassName();
How do you create an immutable class in Java?
كيف تقوم بإنشاء فئة غير قابلة للتغيير في جافا؟
كيف تقوم بإنشاء فئة غير قابلة للتغيير في جافا؟
In Java, which of the following is the correct way to declare an array of integers?
Anonymous Quiz
20%
int[] nums;
12%
int nums[];
21%
int nums = new int[];
47%
A and B are correct
❤1
In Java, which method is used to find the length of an array?
في جافا، أي طريقة تستخدم لإيجاد طول المصفوفة؟
في جافا، أي طريقة تستخدم لإيجاد طول المصفوفة؟
In Java which of these is a correct implementation of the Singleton pattern?
Anonymous Quiz
54%
Using a public static method to return the same instance of the class
19%
Instantiating the class using a constructor
12%
Declaring all methods and variables as static
15%
Using a final class
Describe the concept of 'method overloading' in Java.
وصف مفهوم 'تحميل الطريقة' في جافا.
وصف مفهوم 'تحميل الطريقة' في جافا.
What is the advantage of using a 'PreparedStatement' in JDBC?
Anonymous Quiz
14%
Improved performance
26%
Protection against SQL injection attacks
12%
Ability to execute multiple queries
49%
Both A and B
Write a Java method that takes an array of integers and returns the sum of its elements.
اكتب طريقة جافا تأخذ مصفوفة من الأعداد الصحيحة وتعيد مجموع عناصرها.
اكتب طريقة جافا تأخذ مصفوفة من الأعداد الصحيحة وتعيد مجموع عناصرها.