Also, can the user buy and sell many times?
If so, I have an idea.
Preferably use an ArrayList, though you could use a Vector I suppose.
Have an ArrayList of products.
Say you start out...
Type: Posts; User: javapenguin
Also, can the user buy and sell many times?
If so, I have an idea.
Preferably use an ArrayList, though you could use a Vector I suppose.
Have an ArrayList of products.
Say you start out...
Not sure if you're using console or JOptionPane, but
use a char
char c = 'c';
String str = "";
System.out.println("Enter a Y for yes or N for no");
str = console.nextLine();