Which keyword is used to pass an object of a class as its own parameter?
Anonymous Quiz
68%
this
4%
self
15%
class
12%
super
What will be the output of the following Java program that demonstrates the concept of inheritance?
ماذا سيكون المخرج للبرنامج جافا التالي الذي يوضح مفهوم الوراثة؟
class Animal {
String sound() { return "Some sound"; }
}
class Dog extends Animal {
String sound() { return "Bark"; }
}
public class TestInheritance {
public static void main(String[] args) {
Animal myDog = new Dog();
System.out.println(myDog.sound());
}
}
ماذا سيكون المخرج للبرنامج جافا التالي الذي يوضح مفهوم الوراثة؟
👍1
How do you achieve abstraction in Java?
Anonymous Quiz
74%
By using abstract classes and interfaces
10%
By using static methods
7%
By using private constructors
9%
By using final classes
Identify and fix the error in the following Java code snippet that attempts to implement polymorphism.
حدد وأصلح الخطأ في الشفرة البرمجية جافا التالية التي تحاول تنفيذ الشكلية البوليمورفية.
interface Shape {
void draw();
}
class Circle implements Shape {
public void draw() {
System.out.println("Circle drawn");
}
}
public class TestPolymorphism {
public static void main(String[] args) {
Shape shape = new Circle();
shape.draw();
}
}
حدد وأصلح الخطأ في الشفرة البرمجية جافا التالية التي تحاول تنفيذ الشكلية البوليمورفية.
How do you convert a string to an integer in Java?
Anonymous Quiz
47%
Integer.parseInt("123")
30%
Integer.toString("123")
14%
String.toInt("123")
9%
"123".toInt()
❤2
What will be the output of the following Java code snippet that demonstrates the use of the 'instanceof' keyword?
ماذا سيكون المخرج للشفرة البرمجية جافا التالية التي توضح استخدام كلمة 'instanceof'؟
class Parent {}
class Child extends Parent {}
public class Test {
public static void main(String[] args) {
Parent obj = new Child();
System.out.println(obj instanceof Child);
}
}
ماذا سيكون المخرج للشفرة البرمجية جافا التالية التي توضح استخدام كلمة 'instanceof'؟
❤2
Which of the following is not an access modifier in Java?
Anonymous Quiz
15%
public
5%
protected
19%
private
61%
friend
What is the output of the following Java program that demonstrates method overloading?
ما هو مخرج البرنامج جافا التالي الذي يوضح إعادة تحميل الطريقة؟
class DisplayOverloading {
public void disp(char c) {
System.out.println(c);
}
public void disp(char c, int num) {
System.out.println(c + " " + num);
}
}
public class Sample {
public static void main(String[] args) {
DisplayOverloading obj = new DisplayOverloading();
obj.disp('a');
obj.disp('a', 10);
}
}
ما هو مخرج البرنامج جافا التالي الذي يوضح إعادة تحميل الطريقة؟
❤1
Write the code to create a program that reads a CSV file containing student information (name, age, grade) and calculates the average grade for each age group.
اكتب الكود لإنشاء برنامج يقرأ ملف CSV يحتوي على معلومات الطالب (الاسم، العمر، الدرجة) ويحسب متوسط الدرجة لكل فئة عمرية.
اكتب الكود لإنشاء برنامج يقرأ ملف CSV يحتوي على معلومات الطالب (الاسم، العمر، الدرجة) ويحسب متوسط الدرجة لكل فئة عمرية.
👍1
Write the code to implement a recursive algorithm to find the nth Fibonacci number.
اكتب الكود لتنفيذ خوارزمية متكررة لإيجاد الرقم الفيبوناتشي الـ nth.
اكتب الكود لتنفيذ خوارزمية متكررة لإيجاد الرقم الفيبوناتشي الـ nth.
Write the code to create a program that simulates a simple patient management system for a healthcare facility, allowing users to add patients, schedule appointments, and track medical records.
اكتب الكود لإنشاء برنامج يحاكي نظام إدارة المرضى البسيط لمرفق رعاية صحية، ويسمح للمستخدمين بإضافة المرضى، وجدولة المواعيد، وتتبع السجلات الطبية.
اكتب الكود لإنشاء برنامج يحاكي نظام إدارة المرضى البسيط لمرفق رعاية صحية، ويسمح للمستخدمين بإضافة المرضى، وجدولة المواعيد، وتتبع السجلات الطبية.
Write the code to implement a recursive algorithm to flatten a nested list (a list containing other lists) into a single list.
اكتب الكود لتنفيذ خوارزمية متكررة لتسطيح قائمة متداخلة (قائمة تحتوي على قوائم أخرى) إلى قائمة واحدة.
اكتب الكود لتنفيذ خوارزمية متكررة لتسطيح قائمة متداخلة (قائمة تحتوي على قوائم أخرى) إلى قائمة واحدة.
Write the code to implement a hash table data structure, including methods to insert, search, and remove key-value pairs.
اكتب الكود لتنفيذ بنية بيانات جدول التجزئة، بما في ذلك طرق لإدراج، والبحث، وإزالة أزواج المفتاح-القيمة.
اكتب الكود لتنفيذ بنية بيانات جدول التجزئة، بما في ذلك طرق لإدراج، والبحث، وإزالة أزواج المفتاح-القيمة.
❤1
Write the code to create an array of integers and initialize it with values in Java.
اكتب الكود لإنشاء مصفوفة من الأعداد الصحيحة وتهيئتها بقيم في جافا.
اكتب الكود لإنشاء مصفوفة من الأعداد الصحيحة وتهيئتها بقيم في جافا.
👍1