This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
How would I declare an array of double of size 100 to store point values of 100 students and assigns each student element a value same as its index (or subscript) number. Would this code work? student = new Student("John", 10, ,'M'); stu.add(student);
Going by your snippet of code, I'm pretty sure that you are creating a student object, passing in your specific arguments to the Student constructor, and then adding that student object to an array list. Are you trying to cycle through those objects and assign an index value to each? Would it be passed in as one of the arguments in the Student constructor? Your request is a bit vague in that respect...Is there anyway that you could clarify what you're looking to accomplish? [ March 04, 2004: Message edited by: Adam Brown ]