Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
used in derka.space for creating search bar.js file
import java.util.*;
public class search_gen {
static void results(ArrayList<String> list) {
for (int i = 0; i < list.size(); i ++) {
System.out.println("\n\nelse if (searchitem.toLowerCase() == '" + list.get(i) + "')\n" +
"window.location.replace(\"\");");
} // End For Loop
} // End results Functions
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String search;
ArrayList<String> list = new ArrayList<>();
boolean go = true;
while (go) {
System.out.print("\nenter new search result: ");
search = scan.nextLine();
if (search.equals("1")) {
go = false;
search_gen.results(list);
} else { list.add(search); }
} // End While Loop
} // End Main
} // End Class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.