uz
Feedback

Firibgarlarga uchmang! Telemetrio bunday kanallarni topadi va belgilaydi 👉 Belgini ko‘rmoqchi bo‘lsangiz, obuna bo‘ling

جافا Java

جافا Java

Kanalga Telegram’da o‘tish

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

Ko'proq ko'rsatish
6 084
Obunachilar
-124 soatlar
-167 kun
-4830 kun
Postlar arxiv
What is the output of the following Java code snippet demonstrating the concept of method overriding?
class Vehicle {
    void run() {
        System.out.println("Vehicle is running");
    }
}
class Bike extends Vehicle {
    void run() {
        System.out.println("Bike is running safely");
    }
}
public class Test {
    public static void main(String[] args) {
        Bike obj = new Bike();
        obj.run();
    }
}
ما هو مخرج الشفرة البرمجية جافا التالية التي توضح مفهوم إعادة تعريف الطريقة؟

Which of the following is a valid declaration of a String variable in Java?
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 لأيام الأسبوع.

What keyword is used to access a method or variable from the superclass in a subclass?
Anonymous voting

https://t.me/java_coffee1 رابط القروب تتناقش فيه مواضيع تقنيه غير الجافا علشان مانطلع من هذا القروب عن الجافا

Correct the error in the following Java code snippet that attempts to override a method in a subclass.
class SuperClass {
    protected void display() {
        System.out.println("SuperClass display");
    }
}
class SubClass extends SuperClass {
    private void display() {
        System.out.println("SubClass display");
    }
}
صحح الخطأ في الشفرة البرمجية جافا التالية التي تحاول إعادة تعريف طريقة في فئة فرعية.

What does the `final` keyword signify when applied to a variable in Java?
Anonymous voting

كثير من اللي هنا مايعرفون اني انزل اسئله يوميه مثل هذي على تويتر بس مختلفه على الأسئلة اللي هنا 🫢
كثير من اللي هنا مايعرفون اني انزل اسئله يوميه مثل هذي على تويتر بس مختلفه على الأسئلة اللي هنا 🫢

What will be the output of the following Java code snippet that demonstrates static method overriding?
class Parent {
    static void show() {
        System.out.println("Parent's show()");
    }
}
class Child extends Parent {
    static void show() {
        System.out.println("Child's show()");
    }
}
public class Test {
    public static void main(String[] args) {
        Parent obj = new Child();
        obj.show();
    }
}
ماذا سيكون المخرج للشفرة البرمجية جافا التالية التي توضح إعادة تعريف الطريقة الثابتة؟

Which of the following is a valid declaration of a method that returns an array of integers in Java?
Anonymous voting

Find and correct the error in the following code snippet to correctly implement encapsulation in Java.
class Student {
    private int age;
    public void setAge(int age) {
        if(age > 0) {
            this.age = age;
        }
    }
    public int getAge() {
        return age;
    }
}
جد وصحح الخطأ في الشفرة البرمجية التالية لتنفيذ التغليف بشكل صحيح في جافا.

What is the result of attempting to compile and run a Java program with a `main` method that does not accept any arguments?
Anonymous voting

Correct the error in the following Java code snippet that tries to encapsulate a class property.
class Student {
    private int age;
    public getAge() {
        return age;
    }
    public void setAge(int age) {
        if(age > 0) {
            this.age = age;
        }
    }
}
صحح الخطأ في الشفرة البرمجية جافا التالية التي تحاول تغليف خاصية صف.

In Java, which keyword is used to inherit from a class?
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 not a loop construct in Java?
Anonymous voting

Identify and fix the error in the following Java code snippet that tries to implement an abstract method in an interface.
interface Animal {
    abstract void eat();
}
class Dog implements Animal {
    public void eat() {
        System.out.println("Dog eats");
    }
}
حدد وأصلح الخطأ في الشفرة البرمجية جافا التالية التي تحاول تنفيذ طريقة مجردة في واجهة.

What is the output of the following code snippet? ```java int a = 5; int b = 2; System.out.println(a / b); ```
Anonymous voting