Results 1 to 2 of 2
Thread: Questionnaire Using Vector
- 01-29-2011, 04:58 AM #1
Member
- Join Date
- Dec 2010
- Posts
- 18
- Rep Power
- 0
Questionnaire Using Vector
I created a file that takes user input sort of like a questionnaire using both a class and an object file. I used vector to store the first entry, is there a way using a do-while loop with a Y/N question to repeat the loop to add another set of input/answer to the vector.
If so can anyone explain exactly how this is done, i've researched and came across quite a number of examples using vector but none showing anything of this manner.
- 01-29-2011, 05:31 AM #2
Senior Member
- Join Date
- Apr 2010
- Location
- Philippines
- Posts
- 580
- Rep Power
- 4
I will show you an example of do loop with Y/N question to repeat the loop or not
This link has an example of vector: Java Vector,Using Vectors in Java,Vector Object in Java,Online Java Vector ExampleJava Code://This will give value to answer same as no answer. int answer = JOptionPane.NO_OPTION; //do not end loop while answer is equals to NO_OPTION; while(answer == JOptionPane.NO_OPTION) { System.out.println("Loop"); answer = JOptionPane.showConfirmDialog(this, "Print loop again?", "QUESTION:", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); }
Similar Threads
-
Help Vector
By nikosv in forum New To JavaReplies: 4Last Post: 12-16-2010, 05:27 AM -
Vector
By ŖàΫ ỏƒ Ңόρę in forum New To JavaReplies: 2Last Post: 05-11-2010, 07:23 AM -
Vector<vector> loop thru
By ocean in forum New To JavaReplies: 11Last Post: 11-21-2009, 02:17 PM -
Vector<Point2D> list = new Vector<Point2D>();Is it possible for 15,000 Point2D obj???
By Mazharul in forum Java 2DReplies: 1Last Post: 04-06-2009, 06:45 AM -
Java Mashup API - Design Patterns Questionnaire
By goldeneyeone in forum Reviews / AdvertisingReplies: 0Last Post: 02-10-2009, 10:03 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks