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

الفرق بين list ,array list

مغلق
بدأه السحاب الابيض في 14 يوليو 2007 · 7 رد · 1,357 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

ما الفرق بين انى اكتب

ا List WhiteSky= new ArrayList();

 

ArrayList  WhiteSky = new ArrayList();
#2

في الحالات العاديه ، لا فرق .

الحالات العديه ، إنك بتعمل برنامج صغير لشركه صغيره و نسبة التغير في الكود بعد ذلك ليست كبيره.

#3

it is not clear can you help more by examples

and thank you

#4

الفرق هو أن List انترفيس عامه ، بمعنى أن ArrayList & Vector & Linked List كلهم subclass من List Interface

هناك مايسمى بـ Declare to interface عندما لايعنيك صنف ArrayList كصنف بشئ ، أنت تريد List عامه قد تكون ArrayList or Vector or LinkedList

هنا تستخدم List وتغيرها متى ماحبيت ...

#5

So from your words I understand that there are no different if I want to assign to my attribute

Array list of linked list ….BUT …I can say it is list... Because it seems that list is general interface

Okay, can I ask more what is the important to interface? By examples please

I know that interface is general frame I put just methods and define attributes but why I do that? why I do not but methods in the class

And make it public and all other class will see it???

And thank you all

#7

www.google.com

what is an interface

#8

thank you i forget google

best wishes

هذا الموضوع مغلق.

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