Java Newbie needs a push forward
I am having difficulty getting a program started. The scenerio is, I have a file that I need imported into a program. The file includes and item number, description and price. My difficulty is whether to load the file in as a parallel array, as a matrix, or line by line. The reason for my confusion is that I will need to do a sort and binary search. Can anyone offer suggestions on which method would probably be the most benificial? Thanks!!!
[452 byte] By [
7lammy] at [2007-11-26 12:03:36]

Assuming the file is a text file with one record per line, then you'd want to define an Item or somesuch class that has fields matching the attribues represented in the file. Read a line, create an Item, break the line apart, and fill in the fields of the item. Put the item in a List or something. Rinse. Repeat.
jverd at 2007-7-7 12:28:57 >

Actually, it is int the format:
int item String description double price int amount availible
That is why I am struggling for a "method" to import the information into the program. The program works similar to a shopping cart, but I will need to do an item search and deduct from the inventory.
> Actually, it is int the format:
> int item String description double price int amount
> availible
This is exactly what I described.
123 Some Thingy 9.95 25
456 Other Thingy 19.95 50
What are the rules for separating one field from another?
> That is why I am struggling for a "method" to import
> the information into the program. The program works
> similar to a shopping cart, but I will need to do an
> item search and deduct from the inventory.
That's completely separate from reading it in and parsing it.
jverd at 2007-7-7 12:28:58 >

my plan is to use a while loop(inFile.hasnext()) and store the data in the variables such as
itemNo = inFile.nextInt;
itemDesc = inFile.next();
and so forth. But will I be able to perform an insertion sort and a binary search on the itemNo? That is where I am stuck, can I import a list of 10 lines, sort and search as I would an array?
Do you understand what Jeff said? If not, tell us what you don't get. His advice is the right way to go, and your objections so far seem irrelevant.
Let me break it down further:
1) define a class that encapsulates the fields in each record in the file
2) the file seems to follow the very typical format of one line per record
3) so you read the file in line by line
4) for each line, pick out the individual fields
5) then with all the fields for a given record, create an instance of the class you defined in (1)
6) add that instance to a java.util.Collection
7) if you want to sort the collection, define java.util.Comparator classes to define the ordering
8) create ordered collections (like a java.util.List) of the content, and use the Comparators
you created in step (7) to sort them
If I were you I would use xml and a library such as http://xstream.codehaus.org/Message was edited by: bart7simpson7I mean you should listen to what paulcw said first and change your file to xml for an improvement.
Nope, no objections, just not quite understanding. Thanks for the breakdown, still learning. I am going to work on my program a bit more. Thanks!!!
> change your file to xml for an improvement.What improvement would that be?
jverd at 2007-7-7 12:28:58 >

> > change your file to xml for an improvement.
>
> What improvement would that be?
Well, it would increase the size of the data file(s) quite a bit and you'll
get all those human 'readable' (mind the quotes) funny angular brackets
all over the place and quite a bit of additional code to parse all of the
hulla baloo. That'd be something to brag about ;-)
kind regards,
Jos
JosAH at 2007-7-7 12:28:58 >

No, you will only have a clearer separation of the specific values. The increase in text size is negligible unless you have thousand or tens of thousands of "rows" in which case you should use a database and not a text file in the first place. You would have less code believe me. (take a look at the link I posted before saying that... it is trivial to do marshalling/unmarshalling of an object using that library. No dom or sax invloved.)
Message was edited by:
bart7simpson7
And a big advantage is you could use a xsl to see the file in a nice format. XML vs text file for a database like use case is rather... XML will always win.
> You would have less code believe me. Sure, and all that additional code that comes with those jars comes forfree? (as in zero-bytes of code and increase of speed).kind regards,Jos
JosAH at 2007-7-7 12:28:58 >

> No, you will only have a clearer separation of the
> specific values.
Clearer for humans or for the computer?
For humans, certainly not. For the program, maybe, but I doubt it. I think there were one or two fields that might have spaces in, which complicates one-line-per-field parsing slightly, but not too much. If they can't have spaces, or if the fields are separated by, say, tab, then it becomes trivial.
> database and not a text file in the first place. You
> would have less code believe me.
From what the OP has described so far, I don't think so. It really depends on the details of the format though.
> (take a look at the
> link I posted before saying that... it is trivial to
> do marshalling/unmarshalling of an object using that
> library. No dom or sax invloved.)
I haven't read the link, but you'd have to either structure your XML file in a way that that program likes, or you'd have to provide code or metadata to describe the structure. And I was under the impression that the OP already has the flat files.
> a big advantage is you could use a xsl to see the
> file in a nice format.
Sounds like you're grossly overengineering this. XML certainly has its place, but from what the OP has said so far, a flat file is well suited to his data.
> XML vs text file for a
> database like use case is rather... XML will always
> win.
Depends what you mean by a "database-like use case." If the database has only a single table (which this case does), and the column layout and content rules are such that it's easy to pick out individual columns from a concatented string of all of them (which seems to be the case here, but we're still lacking details), then no, flat-file is better.
jverd at 2007-7-7 12:28:58 >

I was referring only to the code you write. If you think that way you should ban import
from your applications. It really depends on the use case in my opinion. If I would have a couple of hundreds records this method works fine. If I would have more I would make my own methods to marshall/unmarshall using dom or sax. For more than 1000 records and the perspective of having more, I would definitely switch to a database.
Another big advantage of using XML is validation. You can make a XSD to validate your data and even generate marshalling/umarshalling classes using JAXB or Castor from the XSD.
regards,
Julian
Message was edited by:
bart7simpson7
No you don't have to provide any kind of information. That is the beauty of it .
I think this discussion has no point so I will hold my thoughts in this matter
> I was referring only to the code you write. If you
> think that way you should ban import
> from your applications.
What in the world are you talking about?
> It really depends on the use
> case in my opinion.
Yes, I said the same thing. And from what little I know of this use case, a flat file seems appropriate.
> If I would have a couple of
> hundreds records this method works fine.
The number of records is less relevant here than their structure and how you're going to access them.
> If I would
> have more I would make my own methods to
> marshall/unmarshall using dom or sax.
Eh? Why? Why does the number of records determine whether you write your own method or use an existing library?
> For more than
> 1000 records and the perspective of having more, I
> would definitely switch to a database.
Thousands of records in a flat file is perfectly reasonable if you're just processing the sequentially.
> nother big advantage of using XML is validation. You
> can make a XSD to validate your data and even
> generate marshalling/umarshalling classes using JAXB
> or Castor from the XSD.
True. Though I've no indication that that's important here.
> on't have to provide any kind of information. That is
> the beauty of it .
Are you saying the library in question will infer what you want from any XML file structured any which way?
jverd at 2007-7-7 12:28:58 >

Ok, after working on the code, here is what I have so far. Please tell me if I am on the right track or not. What I want to do, as a recap, is import this file of 10 records, 1 per line. Each record will be an object of groceryInv. Once the text file is imported, I want to put item "itemNo" into a list that can be sorted and searched. This will be used in a gui later on.So, here goes;
Here is the class i created to store the fields;
public class groceryInv
{
int itemNo;
String itemDesc;
double itemPr;
int itemInv;
public groceryInv()
{
setInv(itemNo, itemDesc, itemPr, itemInv);
}
public groceryInv(int itemNo, String itemDesc, double itemPr, int itemInv)
{
setInv(itemNo, itemDesc, itemPr, itemInv);
}
public void setInv(int itemNo, String itemDesc, double itemPr, int itemInv)
{
itemNo = 0;
itemDesc = "";
itemPr = 0;
itemInv = 0;
}
public int getitemNo()
{
return itemNo;
}
public String getitemDesc()
{
return itemDesc;
}
public double getitemPr()
{
return itemPr;
}
public int getitemInv()
{
return itemInv;
}
}
And here is the program that I started;
import java.io.*;
import java.util.*;
//Name of the public class
public class InvProgram
{
//The method main and file not found exception
public static void main(String[] args) throws
FileNotFoundException, IOException
{
//Declare the variables
int index;
int itemCount;
int itemNo;
int itemStock;
int itemInv ;
int i = 0;
double itemPr;
String itemDesc ;
String itemSearch;
String inputString;
groceryInv gStock = new groceryInv();
//Create and Associate the stream objects
Scanner inFile = new Scanner(new FileReader("groceryinv.txt"));
while (inFile.hasNext() )
{
itemNo = inFile.nextInt();
itemDesc = inFile.next();
itemPr = inFile.nextDouble();
itemInv = inFile.nextInt();
i++}
itemCount = i;
}
Ok, i can see that I am not telling the program where to store the data, just to import it. Any suggestions? Please?
First of all name your classes with uppercase names as this is how it is done in Java. Secondly your constructors and setInv method have no logic.
Try this for your class:
public class GroceryInv {
private int itemNo;
private String itemDesc;
private double itemPr;
private int itemInv;
public GroceryInv(int itemNo, String itemDesc, double itemPr, int itemInv) {
setInv(itemNo, itemDesc, itemPr, itemInv);
}
public GroceryInv(){
this(0,"",0,0);
}
public void setInv(int itemNo, String itemDesc, double itemPr, int itemInv) {
this.itemNo = itemNo;
this.itemDesc = itemDesc;
this.itemPr = itemPr;
this.itemInv = itemInv;
}
public int getitemNo() {
return itemNo;
}
public void setitemNo(int itemNo){
this.itemNo = itemNo;
}
public String getitemDesc() {
return itemDesc;
}
public void setitemDesc(String itemDesc) {
this.itemDesc = itemDesc;
}
public double getitemPr() {
return itemPr;
}
public void setitemPr(double itemPr) {
this.itemPr = itemPr;
}
public int getitemInv() {
return itemInv;
}
public void setitemInv(int itemInv) {
this.itemInv = itemInv;
}
}
null
> The reason for my confusion is that I
> will need to do a sort and binary search. Can anyone
> offer suggestions on which method would probably be
> the most benificial? Thanks!!!
Use sort( ) and binarySearch( ) of java.util.Arrays if you use an array or same methods of java.util.Collections if you use a List. Note that if you do not like repeated elements, you can use a SortedSet, as a TreeSet, for keep elements ordered.
K, made those changes, thanks!!!! Now I can get my prgram to compile, but when I try to run, I get these error messages;
Exception in thread "main" java.util.InputMismatchException
at java.util.Scanner.throwFor(Unknown Source)
at java.util.Scanner.next(Unknown Source)
at java.util.Scanner.nextDouble(Unknown Source)
any suggestions?
Are you putting a double where an int is expected or something like that?
No, the first thing I am trying to do is import a file with 10 records in it. This is what I have so far to import the file;
GroceryInv gStock = new GroceryInv();
//Create and Associate the stream objects
Scanner inFile = new Scanner(new FileReader("groceryinv.txt"));
while (inFile.hasNext())
{
itemNo = inFile.nextInt();
itemDesc = inFile.next();
itemPr = inFile.nextDouble();
itemInv = inFile.nextInt();
i++;
}
I want to create a list of these items so that I can do a sort and search.
Scanner FAILS if you want to read a double, i had the same problem time ago, and write a request to fix it. JDK developers have no solve this.
Try this:
java.util.Scanner in=new java.util.Scanner("1 1.0");
System.out.println(in.nextInt());
System.out.println(in.hasNextDouble());
Solution that I applied was to use next() method and apply Double.parseDouble() conversion, it does not should be the most elegant solution but it works.
> Scanner FAILS if you want to read a double, i had the
> same problem time ago, and write a request to fix it.
What is it that you think needs to be fixed? If the next token can be parsed as a double, then nextDouble works. If not, it fails. This is as it should be.
> Solution that I applied was to use next() method and
> apply Double.parseDouble() conversion, it does not
> should be the most elegant solution but it works.
Then there's something else wrong with your code. nextDouble works.
jverda at 2007-7-21 15:34:11 >

> K, made those changes, thanks!!!! Now I can get my
> prgram to compile, but when I try to run, I get these
> error messages;
> Exception in thread "main"
> java.util.InputMismatchException
> at java.util.Scanner.throwFor(Unknown Source)
> at java.util.Scanner.next(Unknown Source)
> at java.util.Scanner.nextDouble(Unknown Source)
>
>
> any suggestions?
Don't try to call nextDouble where the next token is not a number.
All of the following, for example, are parseable with nextDouble:
1.23
1
0
-99
-5.5
6.5e4
jverda at 2007-7-21 15:34:11 >

Ok, I am lost. What do I need to do to get the file imported? Thanks, I appreciate all of your help, it isn't easy being green (new).
> Ok, I am lost. What do I need to do to get the file
> imported? Thanks, I appreciate all of your help, it
> isn't easy being green (new).
http://java.sun.com/docs/books/tutorial/essential/io/index.html
Without more details as to what exactly you're having trouble with, I can't offer anything more detailed.
jverda at 2007-7-21 15:34:11 >

Ok, how do i resolve the InputMismatchException message?
> What is it that you think needs to be fixed? If the
> next token can be parsed as a double, then nextDouble
> works. If not, it fails. This is as it should be.
String number="1.0";
System.out.println(Double.parseDouble(number));
// If a exception is not thrown, ok?
java.util.Scanner in=new java.util.Scanner(number);
System.out.println(in.nextDouble());
// A exception is thrown.
If Scanner don't fail, could someone explain me what is the correct behavior, please?
> > What is it that you think needs to be fixed? If the
> > next token can be parsed as a double, then nextDouble
> > works. If not, it fails. This is as it should be.> String number="1.0";
> System.out.println(Double.parseDouble(number));
> // If a exception is not thrown, ok?
> java.util.Scanner in=new java.util.Scanner(number);
> System.out.println(in.nextDouble());
> // A exception is thrown.
> If Scanner don't fail, could someone explain me what
> is the correct behavior, please?
An exception is not thrown when I run that.
You are hallucinating.
I think it's an internationalization issue. Try this:import java.text.*;...Locale.setDefault(Locale.ENGLISH); ...before doing anything.If it works feed me some dukes :D
Works for me.java version "1.5.0_06"Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)What version of Java are you using?
jverda at 2007-7-21 15:34:16 >

> > Locale.setDefault(Locale.ENGLISH);[/code]> ...before doing anything.Good catch. That's probably it.
jverda at 2007-7-21 15:34:16 >

From what I can see, and have tried, i am getting the error;
Exception in thread "main" java.util.InputMismatchException
at java.util.Scanner.throwFor(Unknown Source)
no matter what. I think my problem in my file import statement
while (inFile.hasNext())
{
itemNo = inFile.nextInt();
itemDesc = inFile.next();
itemPr = inFile.nextDouble();
itemInv = inFile.nextInt();
i++;
}
I had stuck a print statement prior to the while statement, and it displayed, so I know the program is failing at the inFile.hasNext() point. Do I need to put anything in the while loop to direct it to gStock?
import java.util.*;
import java.io.*;
public class Main {
public static void main(final String[] args) {
ArrayList<GroceryInv> myList = new ArrayList<GroceryInv>();
Locale.setDefault(Locale.ENGLISH);
System.out.println(Locale.getDefault());
readFile(myList);
Iterator<GroceryInv> i = myList.iterator();
while (i.hasNext()) {
GroceryInv g = i.next();
System.out.println(g.getitemNo() + " " + g.getitemDesc() + " "
+ g.getitemPr() + " " + g.getitemNo());
}
GroceryInv myNewItem = new GroceryInv(4, "Description", 100, 20);
myList.add(myNewItem);
writeRecord(myNewItem);
}
public static void readFile(ArrayList<GroceryInv> list) {
int itemNo;
int itemInv;
double itemPr;
String itemDesc;
Scanner inFile = null;
try {
inFile = new Scanner(new FileReader("groceryinv.txt"));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
while (inFile.hasNext()) {
itemNo = inFile.nextInt();
itemDesc = inFile.next();
itemPr = inFile.nextDouble();
itemInv = inFile.nextInt();
GroceryInv newItem = new GroceryInv(itemNo, itemDesc, itemPr,
itemInv);
list.add(newItem);
}
}
public static void writeRecord(GroceryInv g) {
String toWrite = g.getitemNo() + " " + g.getitemDesc() + " "
+ g.getitemPr() + " " + g.getitemInv();
try {
PrintWriter out = new PrintWriter(new BufferedWriter(
new FileWriter("groceryinv.txt", true)));
out.println(toWrite);
out.flush();
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
> From what I can see, and have tried, i am getting the
> error;
> Exception in thread "main"
> java.util.InputMismatchException
> at java.util.Scanner.throwFor(Unknown Source)
> no matter what.
After each call to any next method in Scanner, print out what you just scanned.
jverda at 2007-7-21 15:34:16 >

> Try this for your class:> public GroceryInv(int itemNo, String itemDesc, double itemPr, int itemInv) {
> setInv(itemNo, itemDesc, itemPr, itemInv);
> }
I'd advise setting these values directly in the constructor, and remove setInv entirely.
> public GroceryInv(){
> this(0,"",0,0);
> }
I'd advise removing this constructor entirely. It doesn't make sense to create an inventory object that refers to nothing.
> public void setInv(int itemNo, String itemDesc, double itemPr, int itemInv) {
> this.itemNo = itemNo;
> this.itemDesc = itemDesc;
> this.itemPr = itemPr;
> this.itemInv = itemInv;
> }
As stated before, I'd advise removing this method, and putting the body of this method in the body of the constructor. If other code can arbitrarily change inventory values, you'll get corrupted data.
> public void setitemNo(int itemNo){
> this.itemNo = itemNo;
> }
I'd advise removing this method. Once you assign a serial number to an inventory item, you don't want to arbitrarily change it. Actually, you probably shouldn't let the caller set it at all, even as an argument to the constructor; a better approach would be to have the constructor call a private static method that finds the next serial number and assigns that. But for now I'd say, just set the serial number once in the constructor, then stop.
> public void setitemDesc(String itemDesc) {
> this.itemDesc = itemDesc;
> }
I'd advise removing this method as well. In a real-world application, you'd probably be able to set the description, but you'd probably also have an audit trail for changes. For a simple homework assignment, I think it's best to make this immutable. If you have three hundred boxes of cereal, you can't change them into three hundred packs of cigarettes by just changing their name, which is what this method basically models.
> public void setitemPr(double itemPr) {
> this.itemPr = itemPr;
> }
Now, this is an example of a good setter; in a grocery store the manager can arbitrarily change the price of things. So a setter method here is entirely appropriate, unlike the other cases.
> public void setitemInv(int itemInv) {
> this.itemInv = itemInv;
> }
I'd advise removing this method, and replacing it with methods that add or remove inventory. In the real world, you increase or decrease your inventory with sales and purchases. You don't arbitrarily set the number of inventory items in the real world -- you can't walk into a warehouse and say "I used to have five boxes of cereal, and now I have three hundred" and have the other boxes of cereal magically appear; rather you'd purchase an additional 295. You get better code if you more closely follow what's being modelled.
Try my code. It's not perfect but it works :)
> Try my code. It's not perfect but it works :)Speaking of which, you're cheating the OP by giving them complete solutions, regardless of the quality.Please give newbies a chance to try it themselves, and hints if they can't. That's how a person learns.
> public static void main(final String[] args) {
> ArrayList<GroceryInv> myList = new ArrayList<GroceryInv>();
Rather than doing everything in main, it would probably be better to create a class that represents a store's inventory as a whole.
> public static void readFile(ArrayList<GroceryInv> list) {
This method would go in such a class.
> public static void writeRecord(GroceryInv g) {
>String toWrite = g.getitemNo() + " " + + g.getitemDesc() + " "
> + g.getitemPr() + " " + g.getitemInv();
(etc)
Rather than all that, it would probably be better to put a toString method in GroceryInv.
Also this method would only write a single grocery inventory item to a file. Are you giving the OP deliberately broken code so they can't just turn it in as-is as a cheat? I understand the impulse, but I think it would only confuse a newbie.
Thanks all of you for all of your help. Ok, first thing-- the version I am using is JDK 5.0, and jGRASP 1.7.5. Next, I tried to use a print statement after each import and I still get ;
Exception in thread "main" java.util.InputMismatchException
at java.util.Scanner.throwFor(Unknown Source)
at java.util.Scanner.next(Unknown Source)
at java.util.Scanner.nextDouble(Unknown Source)
at the double. It is taking the item price and descript, but not the price. Even the awseome coding that bart7simpson7 provided. Arrgggh. If I had a zillion dukes, you all would get em, dont worry though, I dont mind passing out the dukes. Anyway, the mismatch exception continues.
Where are you physically located? What country?
Have you set up your computer so that it reflects your location? Or some other location in particular?
What double value in question is not being parsed correctly? I mean, look at your input file. By looking at the stuff that did get printed, figure out what text nextDouble is choking on. Tell us what that is.
I only modified his solutions in two minutes. (I would have done this differently but I didn't want to confuse him. By seeing some differences I think he can gain something)
I posted the code for him to realize that it IS because of the Locale variable that he gets that error and not because of his imports.
Message was edited by:
bart7simpson7
Hm... this is strange... If you've set your locale to english, what is the format of the doubles in your file ? You are using 100.00 or 100,00 ?
The Locale thing might be it, actually it probably is, but it might not. This feels a little like a red herring.
> Thanks all of you for all of your help. Ok, first
> thing-- the version I am using is JDK 5.0, and jGRASP
> 1.7.5. Next, I tried to use a print statement after
> each import and I still get ;
> Exception in thread "main"
Yeah, but what's printed out from the scan right before that? And what's next in the file?
jverda at 2007-7-21 15:34:16 >

@OP:
Actually, didn't you say that the file had only ten lines?
Just post the file's contents, then, if it's just 10 lines of text.Wrap it in [code][/code] tags when you do.
And tell us where you are.
[add]
And also tell us where you are in the file and the next thing being read.
Message was edited by:
paulcw
> The Locale thing might be it, actually it probably
> is, but it might not. This feels a little like a red
> herring.
I think subthreads are getting crossed here.
Locale is probably why govisagod512 (not the OP) is getting the exception trying to scan "1.0" with nextDouble.
I don't know the details of the OP's problem. That's why I want to see what he's scanning and what it's barfing on.
jverda at 2007-7-21 15:34:21 >

> What double value in question is not being parsed
> correctly? I mean, look at your input file. By
> looking at the stuff that did get printed,
> figure out what text nextDouble is choking on. Tell
> us what that is.
Exactly. That's what I was getting at with my suggestion to print the results of each call to nextXxx.
jverda at 2007-7-21 15:34:21 >

Ok, found a problem with my item desc, it was a very stupid mistake that had me going in circles, got the first part of my program working. Instead of Pop_Corn, I had Pop Corn. I should know better. GRR.Thanks to all of you!!!!! Yes I am student, working towards programming at work. Now, the second part of my question, will I be able to use;
list.add(newItem);
and be able to perform my selection sort and binary search? Also, how long did it take you folks to learn java? Once I get moving I do ok, but I got really stuck on this one and appreciate the big nudge forward!!!!!
Oh, and I am in the USA. Northeast.
Message was edited by:
7lammy
> Now, the second part of my question, will I be
> able to use;
> list.add(newItem);
> and be able to perform my selection sort and binary
> search?
Is part of this homework assignment to write the sort yourself? Or can you just use a sort utility provided by the API?
Anyway, adding an item to a list should still let you sort, either way.
> Also, how long did it take you folks to learn
> java?
Define "learn". I was writing and running simple programs in five minutes, but then I had a CS degree already. It probably took a month or so to shake out my inapplicable habits from previous languages. The language has changed over the years so new stuff had to be learned. I still don't write flawless code, if that's what you're asking; nobody does.
What you really need to learn is programming concepts and practices. You'll get a handle on that soon enough. If you learn more languages you'll learn more concepts and more completely.
> Once I get moving I do ok, but I got really
> stuck on this one and appreciate the big nudge
> forward!!!!!
The next one will be much easier.
> part of my question, will I be able to use;
> list.add(newItem);
> and be able to perform my selection sort and binary
> search?
Yes. If newItem properly overrides equals and hashCode, and implements Comparable (or you provide a Comparator).
See this for equals and hashCode:
http://developer.java.sun.com/developer/Books/effectivejava/Chapter3.pdf
These for Comparable/Comparator:
[url=http://www.onjava.com/lpt/a/3286]Making Java Objects Comparable[/url]
http://java.sun.com/docs/books/tutorial/collections/interfaces/order.html
http://www.javaworld.com/javaworld/jw-12-2002/jw-1227-sort.html
> Also, how long did it take you folks to learn
> java?
Everyone learns at his own pace, so it's difficult (and largely meaningless) to try to judge whether you're learning "fast enough," or to predict how quickly you should expect to learn it. For me it was easy to get the basics, but then, I'd already been programming professionally for a number of years in other languages, including C++. Java was just another tool at that point. On the other hand, there are still huge tracts of unknown territory for me in the the vast Java landscape.
jverda at 2007-7-21 15:34:21 >

K, thanks. I lost my job in networking and found myself without any certs, so i decided to go to school. Java is my first programming class, on top of working full time. I have a good supervisior at work that is going to get me looking at code at work too. This isn't my homework assignment directly. This is my striving to learn, and learning to ask and how to ask for help. I will continue to develop this program as I still have quite a bit to go on it, I just needed to get the import working first. Thanks again all!!!!