Therefore, adding stuff to my custom linked list There are relevant bits of code here error occurs when I have a: This is a better version: I'm not sure that you really need parameters array to include (a new array of int Zero values will be filled) - But I'll leave it as one exercise the reader: -) NullPointerException , And I can not understand why, for my life, the program aims to emulate a chest of a drawer, in which there is a list in which the drawers are nodes. Each of the drawers has a list in which the domestic items are included in the form of nodes.
new chestoff drivers (3); In my UI category:
Public class chestoff drivers {Private Stable Onyelist Chest; Private static int [] parametres; Public Chest Of Driers (Intro Drawers) {chest = new OwnList (); Surge (); } To make public static void () (for (int i = 0; i & lt; parametres.length; i ++) {Object drawer = New drawer (i, paramometers [i]); Chest.add (i, drawer ); // This is causing the error}}}
int. I requires drawer capability in the form of ID and
int parametres before the list is made in the
parametres [] array is filled and it contains the drawer's capacity Information for The included list in question (
OwnList) is 100% working correctly because it is part of a given curriculum content, it is similar to Java itself. I have another test Tested the class in class and it worked fine, I made a mistake here, please help!
Public Ultimate Division Chestoff Drawers {Private Finals O'Neilist Chest = New Onlist (); Private Final Ent Parameters; Public Chest Of Drawers (Intra Drawers) {If (Dare & Lt; 0) Exclude New Invalid Argument Exceptions ("Drafts can not be negative"); Chest = new onilist (); Parametres = new int [drawer]; // & lt; - I believe that it means the initial (); } Private Zero Start () (for (int i = 0; i & lt; parametres.length; i ++) {Object Drawer = New Drawer (I, Parameters [i]); //
No comments:
Post a Comment