aspose file tools*
The moose likes Beginning Java and the fly likes Changing array I think and the print statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Changing array I think and the print statement" Watch "Changing array I think and the print statement" New topic
Author

Changing array I think and the print statement

mike statham
Greenhorn

Joined: Feb 24, 2012
Posts: 16
I want to change from Syste.out.printf() too println() on main program.

I also want to have not to rely on just five records in afile, have the ooption of having five or a 1000 without having to set the field vaule, is these possible?

Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8244
    
  23

mike statham wrote:I want to change from Syste.out.printf() too println() on main program.

So do it. I don't understand the question.

I also want to have not to rely on just five records in afile, have the ooption of having five or a 1000 without having to set the field vaule, is these possible?

Yes. Have a look at ArrayList.

BTW, please split up that enormous line in your code. It really screws up the windowing software here.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39869
    
  28
Why haven’t you got a Student class which encapsulates name and marks? Trying to run two arrays in parallel is error-prone and not good design.
You can have as many lines as you like, but they are a lot easier to add to a List than to an array.
Keep printf(); it is more versatile than println().
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing array I think and the print statement