Results 1 to 1 of 1
- 01-29-2011, 08:08 PM #1
Member
- Join Date
- Jun 2010
- Location
- Ohio
- Posts
- 9
- Rep Power
- 0
return multiple values from class methods
Okay so i have this class that is reading a text file with values in it. I want the class to return all these files so that i can input these values into the program for use. for some reason i am stuck and retrieving these values from the class. any ideas?
x has already been declared and is used as the file.
Java Code:public class readFile{ public void readFile(){ while(x.hasNext()){ // year, model, make, color, style, vin, plate, notes; year = x.nextLine(); model = x.nextLine(); make = x.nextLine(); color = x.nextLine(); style = x.nextLine(); vin = x.nextLine(); plate = x.nextLine(); notes = x.nextLine(); this.year = year; this.model = model; this.make = make; this.color = color; this.style = style; this.vin = vin; this.plate = plate; this.notes = notes; } }
Similar Threads
-
Return values and Recursion
By blug in forum New To JavaReplies: 4Last Post: 11-14-2010, 12:55 PM -
Methods, JOptionPane, Return Values
By Cubba27 in forum New To JavaReplies: 2Last Post: 12-04-2009, 02:46 AM -
java method with multiple return values
By Ms.Ranjan in forum New To JavaReplies: 1Last Post: 06-18-2009, 06:08 PM -
[SOLVED] Multiple return values
By Manfizy in forum New To JavaReplies: 17Last Post: 05-25-2009, 12:07 PM -
accessing return values from another class
By moaxjlou in forum New To JavaReplies: 3Last Post: 10-31-2008, 02:25 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks