ما الفرق بين انى اكتب
ا List WhiteSky= new ArrayList(); ArrayList WhiteSky = new ArrayList();
ما الفرق بين انى اكتب
ا List WhiteSky= new ArrayList(); ArrayList WhiteSky = new ArrayList();
في الحالات العاديه ، لا فرق .
الحالات العديه ، إنك بتعمل برنامج صغير لشركه صغيره و نسبة التغير في الكود بعد ذلك ليست كبيره.
it is not clear can you help more by examples
and thank you
الفرق هو أن List انترفيس عامه ، بمعنى أن ArrayList & Vector & Linked List كلهم subclass من List Interface
هناك مايسمى بـ Declare to interface عندما لايعنيك صنف ArrayList كصنف بشئ ، أنت تريد List عامه قد تكون ArrayList or Vector or LinkedList
هنا تستخدم List وتغيرها متى ماحبيت ...
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
www.google.com
what is an interface
thank you i forget google
best wishes
هذا الموضوع مغلق.