LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] OT: Java Need Advice

[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
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell