[ILUG] OT: Java Need Advice

Frank Murphy frankly3d at gmail.com
Sun Feb 27 14:04:38 GMT 2011


Playing with Arrays.

I'm uncertain if possible.

I will have two classes.

A.java
B.java (contains public static void main (String [] args)


A: has to ask the user 6 questions,
answers will be  (string, int, double, boolean) values.
Instead of using set JOptionPane("Blah blah blah")
get return whatever (string, int, double, boolean) variable.

I'm thingking of making an array with the 6 questions,
but can an array use both default and user set constructors\variables?



or would I need two arrays in A, one as a default constructor type,
one as user input type.

eg:
Array myArray = new Array[6];
myArray[0] = "";

Array myArray = new Array[6];
myArray[0] = JOptionPane("Blah blah blah");

B: If I can do A, I could then create an array in B,
  to call the array in A.
as I will have to compare up to 5, instances of A.
Dearest etc.


-- 
Regards,

Frank Murphy
UTF_8 Encoded
Friend of Fedora


More information about the ILUG mailing list