I need to maintain a list of unique strings. What container should I use? I need the following requirements:
1) check to see if the string exists in the container (note that it could be a different String object with the same text)
2) must be fast. I mean I don't want the container to be looping through each element doing an equals() call for each element
So I'm thinking it should be some kind of container where the Strings are added in sorted order. This way any kind of equals call can use a divide and conquer approach to testing or something similar.
Are there any containers like this? Whether inside the JDK or freely available somewhere?
Or does anyone have any suggestions the best way to build one?
Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.
This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn one way to get user input in Java.
Introduce the Scanner object:
Declare the variable that stores the user input:
An example prompting the user for input:
Methods you need to invoke in order to properly get user input:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program.
Download Eclipse installation zip file:
Extract files from zip file:
Download and install JDK 8:
Open Eclipse and …