Results 1 to 2 of 2
- 05-17-2010, 06:51 PM #1
Member
- Join Date
- May 2010
- Posts
- 1
- Rep Power
- 0
Please help, this code has dissapointed me
please i need an idea of how to prevent duplication,i wrote a code to read from text file and store in an array and also to do random selection on the array element using the index but later, that was achieved but i used hash set to remove duplicate bot it is not working, what can i do
- 05-17-2010, 07:00 PM #2
Senior Member
- Join Date
- Feb 2010
- Location
- Ljubljana, Slovenia
- Posts
- 470
- Rep Power
- 4
Random selection is achieved easier on structures that store elements based on index. One such structure is Vector, look through the API for it, and you'll also find a nifty little method that can prevent duplicaton. I'd also suggest that in the future, try to be clearer about what you are doing and what you need help with. Also, have a look at this:
The Short, Self Contained, Correct (Compilable), Example or SSCCE (taken from Fubarables sig).
Posting an SSCCE of what you are trying to acomplish will make your question more understandable, and people will be more eager to answer.Ever seen a dog chase its tail? Now that's an infinite loop.
Similar Threads
-
can any one pls send me a sample code for calling a jsp code in swings
By sniffer139 in forum AWT / SwingReplies: 1Last Post: 03-04-2010, 11:19 AM -
Convert java code to midlet code
By coldvoice05 in forum New To JavaReplies: 1Last Post: 08-12-2009, 11:14 AM -
Convert java code to midlet code
By coldvoice05 in forum Advanced JavaReplies: 1Last Post: 08-09-2009, 01:21 PM -
I need help fixing my code.. or non code?
By MrHuggykins in forum New To JavaReplies: 1Last Post: 03-19-2008, 10:12 PM -
Generating Code Automatically Using Custom code Template In Eclipse
By JavaForums in forum EclipseReplies: 1Last Post: 04-26-2007, 03:52 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks