تجمع شيتات واسئلة oop
813 subscribers
345 photos
12 videos
166 files
37 links
شوفو التثبيتات واتركو لنا دعوة جزاكم الله خيرا. 🤍
Download Telegram
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);
}
}
}


شن الرن؟

تتبع اسئلة امتحانات
:
java
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");
}
}

ما ناتج البرنامج على الشاشة الرن؟؟
👍1
تتبع الوراثة⬆️
@AMVIIPbot

بوت برمجة يساعدك
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");
}

}

تتبع استاذ خالد
Forwarded from OOP with Zero To Hero
One of the reasons to use static variables is memory efficiency?
Anonymous Quiz
85%
True
15%
False
Is it the main reason?
Anonymous Quiz
61%
True
39%
False
تجمع شيتات واسئلة oop
why??
باختصار، استخدام الكلمة الرئيسية static

لتنفيذ البرنامج بدون الحاجة إلى إنشاء كائن من الفئة المحتوية عليها ويكون الاتربيوت مشترك بين جميع الobject
👍3
تغير قيمة الfinal
Anonymous Quiz
73%
خطأ كومايلر
27%
خطأ رن
انواع الوراثة⬇️

1.single inheriance(العادي البسيط الاب والابن)
2.multlevel inheritance(الاب والابن والجد)
3.Hierarchical inheritance( الهرمي الاب عندا أبنين)
4.Hybrid inheritance

........................ لا تدعمها الجافا ⬇️
4.Multiple inheritanc(دائري)
اشكالهن👆🏻
Forwarded from المُصْحَف
« نام وأنت مغفور الذنب »

‏من قال حين يأوي إلى فراشه:
لا إله إلا الله وحده لا شريك له،له الملك وله الحمد وهو على كل شيء قدير،لاحول ولا قوةً إلا بالله،سبحان الله والحمدلله ولا إله إلا الله والله أكبر

‏غفر الله ذنوبه أو خطاياه وإن كانت مثل زبد البحر🤍
8