ENع
الدرس 06 · Objects

Classes and objects

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

A class is a blueprint and a type: it lists the fields every object has and the methods that work on them. Follow a small bank account through memory: new makes an object on the heap with its fields at their defaults, the constructor gives it a valid start, and the variable keeps only a reference. Copy that variable and you copy the reference, so two names share one object, and the program prints 75.

12 دقيقة10 خطوات5 أسئلةIntermediate
شكل 6 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.