I have two lists: The first list is a list of MyObject which contains an int and a String: The second list is simply a list of strings: I want to compare the list of strings (personList) with string in the list of MyObject (myObjectList) and return a list of id’s with all the matches. So in the examle i…
Tag: compare
how to compare 2 set values in the same arraylist in java
I have an arraylist of employees. Within this the id and name are non changeable, while the hours contracted and planned are changeable. I have managed the first 3 questions stated below, but stuck on the last one. Besides the 3 Classe below, i also have the Class Workspace. I have the Class Employee. This ex…
how to compare two numbers with selenium and java? (One number from CSV file and another in website)
I wrote a Program to compare prices in website with a csv file with selenium and java, at the end of program i wrote assert to confirm two numbers but it has a problem: expected price is 57,15 Actual price is 57.15 Actual Price should be 57,15 and i dont know how should i write that, Can you please help
Count occurrences in 2D Array
I’m trying to count the occurrences per line from a text file containing a large amount of codes (numbers). Example of text file content: I want to compare a similar set of numbers that I get from a text field, for example: 9107,4405,2387,4499 The only result I’m looking for, is if it contains mor…
I can’t seem to figure out why I keep getting true when I clearly overridden the equality method
I’m trying to figure this out but I can’t seem to get it to compare correctly. As I try to setup the code whenever I run it the result would end up becoming True when I need it to produce a false test as well. Extensive testing shows it to be always true and I have no idea how to
Best solution for an anagram check?
I’m going through a permutation/anagram problem and wanted input on the most efficient means of checking. Now, I’m doing this in Java land, and as such there is a library for EVERYTHING including sorting. The first means of checking if two string are anagrams of each other is to check length, sort them in som…