en
Feedback
جافا Java

جافا Java

Open in Telegram

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

Show more
6 325
Subscribers
-324 hours
-127 days
-6030 days
Posts Archive
اكتب البرنامج للمزيد
اكتب البرنامج للمزيد

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());
    }
}
ماذا سيكون المخرج للبرنامج جافا التالي الذي يوضح مفهوم الوراثة؟

In Java, which keyword is used to inherit properties and methods from another class?
Anonymous voting

اكتب البرنامج
اكتب البرنامج

🚨 ATTENTION 🚨 Friends, I asked for a special link from binance free vip channel, don't miss ❗ Only 100 Members Exclusive Li
🚨 ATTENTION 🚨 Friends, I asked for a special link from binance free vip channel, don't miss ❗ Only 100 Members Exclusive Link 👇👇👇 https://t.me/+tY1KS_VpiFozNWZi LIMITED TIME OPEN LINK ❗

#تنويه #إعلان_مدفوع  لمدة 24 ساعة 👇👇 (لسنا مسؤولين عن محتوى ومصداقية الإعلانات)

What will be the output of the following Java code snippet demonstrating the use of abstract classes?
abstract class Shape {
    abstract void draw();
}
class Rectangle extends Shape {
    void draw() {
        System.out.println("Drawing Rectangle");
    }
}
public class Test {
    public static void main(String[] args) {
        Shape shape = new Rectangle();
        shape.draw();
    }
}
ماذا سيكون المخرج للشفرة البرمجية جافا التالية التي توضح استخدام الصفوف المجردة؟

Which of these is the correct way to define a constructor that takes a string and an integer as arguments in a class named `Person` in Java?
Anonymous voting

What is the output of the following Java code snippet demonstrating the use of a for-each loop?
int[] numbers = {1, 2, 3, 4, 5};
for(int num : numbers) {
    System.out.print(num + " ");
}
ما هو مخرج الشفرة البرمجية جافا التالية التي توضح استخدام حلقة for-each؟

What is the base class of all classes in Java?
Anonymous voting

Fix the error in the following Java code snippet to correctly calculate the factorial of a number using recursion.
public int factorial(int n) {
    if (n == 1)
        return 1;
    else
        return n * factorial(n - 1);
}
أصلح الخطأ في الشفرة البرمجية جافا التالية لحساب عامل رقم باستخدام العودية بشكل صحيح.

Which of the following is true about the final keyword in Java?
Anonymous voting

What is the output of the following Java code snippet?
String name = "Java";
System.out.println(name instanceof String);
ما هو مخرج الشفرة البرمجية جافا التالية؟

What is the purpose of the `super` keyword in Java?
Anonymous voting

🔴 الحق قبل الحذف🔴 قناة برمجة وتطوير  لكل مايهمك بالبرمجة 👨‍💻🔥 @pro2dev @pro2dev @pro2dev t.me/pro2dev

What will be the output of the following Java code snippet that demonstrates the use of the 'instanceof' keyword?
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'؟

How do you write an if-else statement to check if a variable `age` is greater than 18?
Anonymous voting

Identify and fix the error in the following Java code snippet that defines an enum for days of the week.
enum Day {
    SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY;
}
حدد وأصلح الخطأ في الشفرة البرمجية جافا التالية التي تعرف enum لأيام الأسبوع.

Which of the following is true about the while loop in Java?
Anonymous voting