جافا Java
Ir al canal en Telegram
ليس عيبًا ألا تعرف شيئًا، ولكن العيب انك لا تريد أن تتعلم
Mostrar más6 320
Suscriptores
-324 horas
-127 días
-6030 días
Archivo de publicaciones
6 320
Fix the error in the following Java code snippet to correctly compare two strings for equality.
String str1 = "Java";
String str2 = "java";
System.out.println(str1 == str2);
أصلح الخطأ في الشفرة البرمجية جافا التالية لمقارنة سلسلتين نصيتين بشكل صحيح من أجل المساواة.6 320
Which principle of Object-Oriented Programming allows a subclass to provide a specific implementation of a method that is already provided by one of its superclasses?
6 320
What will be the output of the following Java code snippet that demonstrates the use of the ternary operator?
int a = 10, b = 5;
int result = (a > b) ? a : b;
System.out.println(result);
ماذا سيكون المخرج للشفرة البرمجية جافا التالية التي توضح استخدام العامل الثلاثي؟6 320
Which method must be implemented by a class that implements the `java.lang.Runnable` interface?
6 320
Fix the error in the following Java code snippet to correctly compare two strings for equality.
String str1 = "Java";
String str2 = "java";
System.out.println(str1 == str2);
أصلح الخطأ في الشفرة البرمجية جافا التالية لمقارنة سلسلتين نصيتين بشكل صحيح من أجل المساواة.6 320
Identify and fix the error in the following Java code snippet to correctly demonstrate the concept of an abstract class.
abstract class Animal {
abstract void eat();
}
class Dog extends Animal {
void eat() {
System.out.println("Dog eats food");
}
}
حدد وأصلح الخطأ في الشفرة البرمجية جافا التالية لتوضيح مفهوم الصف المجرد بشكل صحيح.6 320
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();
}
}
حدد وأصلح الخطأ في الشفرة البرمجية جافا التالية التي تحاول تنفيذ الشكلية البوليمورفية.6 320
What is the output of the following Java code?
```java
String str1 = "Java"; String str2 = new String("Java"); System.out.println(str1 == str2); ```
6 320
What is the output of the following Java code snippet using polymorphism?
class Animal {
void sound() {
System.out.println("Animal makes a sound");
}
}
class Dog extends Animal {
void sound() {
System.out.println("Woof");
}
}
public class Test {
public static void main(String[] args) {
Animal myAnimal = new Dog();
myAnimal.sound();
}
}
ما هو مخرج الشفرة البرمجية جافا التالية باستخدام الشكلية البوليمورفية؟6 320
What will be the output of the following Java code snippet that demonstrates the use of static variables?
class Counter {
static int count = 0;
Counter() {
count++;
System.out.println(count);
}
}
public class TestCounter {
public static void main(String[] args) {
Counter c1 = new Counter();
Counter c2 = new Counter();
Counter c3 = new Counter();
}
}
ماذا سيكون المخرج للشفرة البرمجية جافا التالية التي توضح استخدام المتغيرات الثابتة؟6 320
Correct the error in the following Java code snippet to properly encapsulate the 'name' field.
class Person {
public String name; // This should be encapsulated
public String getName() {
return name;
}
public void setName(String newName) {
this.name = newName;
}
}
صحح الخطأ في الشفرة البرمجية جافا التالية لتغليف حقل 'name' بشكل صحيح.6 320
Which of the following is a valid Java statement to check if 'x' is either 10 or 20?
¡Ya disponible! Investigación de Telegram 2025 — los principales insights del año 
