The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2002

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

lottery

Posted by Danny on January 14, 2002 at 7:08 PM

Hi experts ! This shozuld be an easy question :
there is a file which contains numbers like 21 12 54 6 8 .. I have to take portions of 6 and program a constructor which initialises an object with the information of the file.

class numberlist
{
private int numberlist[]=new int[6];

// Constructors
for (i=1;i<=6;i++)
{public numberlist[i]= ** ? **
}
}

** ? ** -> How to put the information from the file "name.txt" into numberlist[i]

Thanks in advance




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us