Java tutorial | دروس جافا 👨🏻‍🏫
2.29K subscribers
87 photos
81 videos
29 files
53 links
حبيت اشاركم كل معرفتي في الجافا ولغات اخرى فسويت هذه القناة
اتمنى أن تعود بالمنفعة عليكم🌹
لطلب حل تكاليف أو مشاريع تواصل معي على

Telegram: @abdu01010

Whatsapp: https://wa.me/967783399063

كما نقدم خدمات تسوقية في القناة مدفوعة الاجرة
..............
Download Telegram
3⃣ Aggregation
The relationship between the whole and part, and the whole and part can be separated.
Aggregate relations also represent the relationship between the whole and part of the class, member objects are part of the overall object, but the member object can exist independently from the overall object.
For example, bus drivers and work clothes and hats are part of the overall relationship, but they can be separated. Work clothes and hats can be worn on other drivers. Bus drivers can also wear other work clothes and hats.

بمعنى أن كل اوبجيكت مستقل عن الاخر فقط يتم الاستفاده من اوبجيكت معين في لفتره محدوده وذا انتهى الاوبجيكت الاول يبقى الثاني كما هو ولا يتأثر اي ان هذه العلاقة عكس ال composition تماما


#classes_relationship
#Java_Level_2
————————————————
📍Channel:
@java_tutorial0101
❤‍🔥1
4⃣ Association
Indicates that a property of a class holds a reference to an instance (or instances) of another class .
Association is the most commonly used relationship between a class and a class, which means that there is a connection between one type of object and another type of object. Combinations and aggregations also belong to associative relations , but relations between classes of affiliations are weaker than the other two.
There are four kinds of associations : two-way associations , one-way associations , self-association , and multiple-number associations .
For example: cars and drivers, one car corresponds to a particular driver, and one driver can drive multiple cars.


#classes_relationship
#Java_Level_2
————————————————
📍Channel:
@java_tutorial0101
❤‍🔥1
📌 توضيح أكثر للموضوع

#classes_relationship
#Java_Level_2
————————————————
📍Channel:
@java_tutorial0101
❤‍🔥1👍1
📌 توضيح أكثر للموضوع

#classes_relationship
#Java_Level_2
————————————————
📍Channel:
@java_tutorial0101
❤‍🔥1
public class Pattern {
public static void main(String[] args) {
int row=5;
for (int i = 0; i < row; i++) {
for (int j = 0; j < row-i; j++) {
System.out.print(" ");
}
for (int j = 0; j <=i; j++) {
System.out.print("* ");
}
System.out.println();
}
}
}
#Java_Level_2
//————————————————-
// Telegram channel:@java_tutorial0101
2👍2
Java_OOP-Cheat_Sheet_Edureka.pdf
255 KB
ورقة فيها ملخص جميل جدا في oop
#Java_Level_2
————————————————
📍TeleChannel: @java_tutorial0101
👍1
📌 درس اليوم عن Exception handling

#Java_Level_2
2
📌 Exceptions handling
——————————————————-
الترجمة الحرفيه لهذا المصطلح هو : معالجة الاستثناءات
المقصود بهذا الموضوع هو ادراة الاحداث الغير مرغوبه او الغير متوقعه التي تحدث اثناء تنفيذ البرنامج او اثناء العمل عليه لتجنب الخروج المفاجئ من البرنامج وما الى ذلك من الاخطاء التي قد تحدث بسبب ادخال خاطئ او عدم وجود بيانات معينة... اي بمعنى انها اخطاء لا تحدث اثناء كتابة الكود.
ملاحظة مهمة :
الاخطاء من هذا النوع سهل حلها من قبل المبرمج نفسه بحيث يقوم بكتابة اكواد معينه تعمل على معالجة هذي الاخطاء وذلك عن طريق تفادي وقوعها .

بتعرفوا كل شي بالتفصيل في الفيديوهات المرفقة اسفل الشرح

————————————————————
#Java_Level_2

Tel: @Java_tutorial0101
2
📌الفرق بين Error و Exception

—————————————--

يمكن تلخيص الفروقات كالتالي:

التعريف:

Error:
هي مشكلات جسيمة تحدث على مستوى النظام أو البيئة، وتكون عادةً خارج سيطرة البرنامج.
—————
Exception:
هي مشكلات تحدث أثناء تشغيل البرنامج بسبب أخطاء برمجية أو مدخلات غير صحيحة، ويمكن معالجتها.
——————————————-
أمثلة:

Error:
مثل OutOfMemoryError (نفاد الذاكرة)، وStackOverflowError (تجاوز سعة المكدس).
—————
Exception:
مثل NullPointerException (محاولة الوصول إلى كائن فارغ)
وIOException (خطأ في الإدخال/الإخراج).
———————————————————
إمكانية المعالجة:

Error:
لا يستطيع المبرمج معالجة الأخطاء باستخدام الكود البرمجي، لأنها عادة تتطلب إصلاحات على مستوى النظام.
—————
Exception:
يمكن للمبرمج معالجتها باستخدام try-catch وغيرها... لمنع توقف البرنامج.
——————————————————
الأصل:

Error:
تنحدر من المكتبة
java.lang.Error.
—————
Exception:
تنحدر من المكتبة
java.lang.Exception.
—————————————-
التأثير:

Error:
عادة ما تتسبب في توقف البرنامج بالكامل.
—————
Exception:
يمكن التعامل معها، والبرنامج يستمر في التنفيذ.

————————————————————
#Java_Level_2

Tel: @Java_tutorial0101
2👍2