جافا Java
Ir al canal en Telegram
ليس عيبًا ألا تعرف شيئًا، ولكن العيب انك لا تريد أن تتعلم
Mostrar más6 320
Suscriptores
-324 horas
-127 días
-6030 días
Archivo de publicaciones
6 320
Which of the following is the correct way to define a constructor for a class named `Book` in Java?
6 320
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();
}
}
ماذا سيكون المخرج للشفرة البرمجية جافا التالية التي توضح إعادة تعريف الطريقة الثابتة؟6 320
Correct the following Java code snippet to use the 'final' keyword appropriately.
class Car {
final int MAX_SPEED;
Car() {
MAX_SPEED = 120;
}
}
صحح الشفرة البرمجية جافا التالية لاستخدام كلمة 'final' بشكل مناسب.6 320
What is the default value of an int variable declared as an instance variable in a class in Java?
6 320
Identify the output of the following Java code snippet that demonstrates the concept of method overloading.
class Display {
void show(int a) {
System.out.println("Integer: " + a);
}
void show(String b) {
System.out.println("String: " + b);
}
}
public class Test {
public static void main(String[] args) {
Display obj = new Display();
obj.show(10);
obj.show("Java");
}
}
حدد مخرج الشفرة البرمجية جافا التالية التي توضح مفهوم تحميل الطريقة.6 320
What is the default value of an object reference declared as an instance variable in Java?
6 320
Correct the error in the following Java code snippet that tries to implement multiple interfaces.
interface FirstInterface {
void firstMethod();
}
interface SecondInterface {
void secondMethod();
}
class MyClass implements FirstInterface, SecondInterface {
public void firstMethod() {
// implementation
}
// Missing implementation for secondMethod
}
صحح الخطأ في الشفرة البرمجية جافا التالية التي تحاول تنفيذ واجهات متعددة.6 320
Consider the following Java code snippet. What will be the output?
class Base {
void display() {
System.out.println("Base display()");
}
}
class Derived extends Base {
void display() {
System.out.println("Derived display()");
}
}
public class Test {
public static void main(String[] args) {
Base obj = new Derived();
obj.display();
}
}
فكر في الشفرة البرمجية جافا التالية. ماذا سيكون المخرج؟6 320
What will be the output of the following Java code snippet that uses an if-else statement?
int number = 10;
if(number > 10) {
System.out.println("Number is greater than 10");
} else {
System.out.println("Number is not greater than 10");
}
ماذا سيكون المخرج للشفرة البرمجية جافا التالية التي تستخدم جملة if-else؟6 320
How do you initialize an array of integers with the size of 5 in Java?
6 320
What will be the output of the following Java code snippet that uses an if-else statement?
int number = 10;
if(number > 10) {
System.out.println("Number is greater than 10");
} else {
System.out.println("Number is not greater than 10");
}
ماذا سيكون المخرج للشفرة البرمجية جافا التالية التي تستخدم جملة if-else؟6 320
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;
}
}
جد وصحح الخطأ في الشفرة البرمجية التالية لتنفيذ التغليف بشكل صحيح في جافا.6 320
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);
}
}
ما هو مخرج البرنامج جافا التالي الذي يوضح إعادة تحميل الطريقة؟6 320
Which collection interface represents a group of objects as a single unit in Java?
6 320
What is the output of the following code snippet?
int moon = 9, star = 2 + 2 * 3;
float sun = star>10 ? 1 : 3;
double jupiter = (sun + moon) - 1.0f;
int mars = --moon <= 8 ? 2 : 3;
System.out.println(sun+", "+jupiter+", "+mars);
¡Ya disponible! Investigación de Telegram 2025 — los principales insights del año 
