الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

[تنبيه - عنوان غير مناسب : ]طلب ضرورى بالجافا

بدأه عيون الاقصى في 16 مارس 2010 · 4 رد · 503 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

انا بصراحة عضوة جديدة فى المنتدى وبتمنى تقبلونى كأخت ليكم

وانا بدرس هندسة حاسوب وطلب منا الدكتور البحث عن هذا السؤال "هل كل private member تورث وشرح بسيط جدا "

بس ياريت يكون باللغة الانجليزية وعشان انا افهمه بالعربى وبكون مشكورة كتير

#3

Java uses three explicit keywords to set the boundaries in a class: public,

private, and protected. Their use and meaning are quite

straightforward. These access specifiers determine who can use the

definitions that follow. public means the following element is available to

everyone. The private keyword, on the other hand, means that no one

can access that element except you, the creator of the type, inside

methods of that type. private is a brick wall between you and the client

programmer. If someone tries to access a private member, they’ll get a

compile-time error. protected acts like private, with the exception that

an inheriting class has access to protected members, but not private

members.

Java also has a “default” access, which comes into play if you don’t use

one of the aforementioned specifiers. This is usually called package

access because classes can access the members of other classes in the

same package, but outside of the package those same members appear to

be private.

Reference: Thinking in Java, Bruce Eckel, p75

تم تعديل هذه المشاركة بواسطة JDurrah في 17 مارس 2010 في 14:49

#4

لو كان الـ variable او الـ method برايفت بيكون خاص بنفس الكلاس ما يورثه الـsubclass واحضار قيمتة او تغيرها يكون عن طريق الـ accessor و mutator ميثودز

#5

الأخ الكريم/الأخت الكريمة

السلام عليكم ورحمة الله وبركاته

مرحباً بكم في منتدى الفريق العربي للبرمجة

نود تنبيهك أن العنوان غير مناسب.

الرجاء اختيار عنوان مناسب أكثر في مواضيعك القادمة، وهذا بمثابة إشعار للأهمية.

وفي حال التكرار سيتعرض موضوعك للإغلاق والحذف!!!

قواعد المشاركة

/index.php?showtopic=29343

شاكرين لكم حُسن تعاونكم

حزمة المحرك الإصدارة 0.8

أي أحد يجد أني ظلمته فليراسلني

وبإذن الله لو كان له حق سيأخذه

728x90.png

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…