סיכום
📄 קובץ
דף עזר מדמח בנושא nodes
24
הורדות
60
צפיות
—
0 דירוגים
תיאור החומר
בגרות 271 , יש בסוף גם קצת על תורים (queue)
דירוג החומר
הדירוג שלך:
חומרים דומים — מדעי המחשב · כיתה י״א
מתוך הקובץ
Node Node <Integer> name1 = new node<Integer>(5,null) פעולה בונה Node <Integer> name2 = new node<Integer>(10,null) n1.setNext(n2); n1.setValue(30) – sets value of n1 to 30 n1.setNext(new Node<Integer>(40,null)) – sets the node after n1 to(40,null) n1.getValue //takes the 1st place in n1 n1.getNext().setValue(77) - sets the value of the thing after n1 to 77 scans everything including the last one while(n1!=null){ n1=n1.getNext(); } Scans everything not including the last one While(hasNext()){ n1 = n1.getNext(); } כתוב פעולההמקבלת רשימה המחזירה רשימה שהיא העתק של המקורית בלי העתקים Public…