ar
Feedback
تجمع شيتات واسئلة oop

تجمع شيتات واسئلة oop

الذهاب إلى القناة على Telegram
438
المشتركون
-224 ساعات
-27 أيام
-1330 أيام
أرشيف المشاركات
باختصار، استخدام الكلمة الرئيسية static في دالة main في Java يجعلها نقطة البداية لتنفيذ البرنامج بدون الحاجة إلى إنشاء كائن من الفئة المحتوية عليها، مما يجعلها معيارية ومناسبة للاستخدام في البرامج الجافا.

Is it the main reason?
Anonymous voting

One of the reasons to use static variables is memory efficiency?
Anonymous voting

package run;


class A
{
     A()            
     {
         this("khalid");
         System.out.println("A");
     }
    public A(String c)
    {
        
        System.out.println(c);
    }
}
class B extends A
{
     B()    
     {
         this("mohammed");
         System.out.println("B");
         
     }
    
    public B(String c)
    {
        
        System.out.println(c);
    }
}
class C extends B
{
    C()   
    {
        System.out.println("Erfadi");
    }
    public C(String c)
    {
        this();
        System.out.println(c);
    }
}

public class Run {

    
    public static void main(String[] args)
    {
     C c=new C("khalid");
    }
    
}
تتبع استاذ خالد

@AMVIIPbot بوت برمجة يساعدك

تتبع الوراثة⬆️

:
class Main {
    public static void main(String[] args) {
        Child c = new Child("5"); 
    }

    class Parent {
        Parent(int x) {
            System.out.print(p int);
        }

        Parent(String A) {
            System.out.print(A); 
        }
    }

    class Child extends Parent {
        Child(int num) {
            super("10"); 
          System.out.print("int");
        }
    }
}
ما ناتج البرنامج على الشاشة الرن؟؟

class Main {
    public static void main(String[] args) {
        Child c = new Child(5); 
    }

    class Parent {
        Parent(int x) {
            System.out.print("x");
        }

        Parent(String A) {
            System.out.print(A); 
        }
    }

    class Child extends Parent {
        Child(String name) {
            super("10"); // استدعاء constructor of Parent with String parameter
            System.out.print(name);
        }
    }
}
شن الرن؟ تتبع اسئلة امتحانات

overloading

خالد الرفادي محاضرة 8.m4a180.34 MB

Repost from O.O.P
مشاهدة "#044 [JAVA] - Types of Relationships (Association, Aggregation "has-a", Composition "part-of")" على YouTube https://youtu.be/c-KSvbSoVW0

Repost from O.O.P
مشاهدة "#045 [JAVA] - Types of Relationships (Association, Aggregation, Composition) With Example" على YouTube https://youtu.be/JXzBz03szvI