I’m relatively new to Java so I’m kind of lost here. Is it wrong when you are trying to compare two strings just use the identical symbol "==" instead of using a method for checking if two strings are identical. Because for what I have tried the first option doesn’t work and I’m very curious ..
Category : equals
I am building out a Unit Conversion app. I need to have one inputs and 2 spinners. The spinners regulate what the current unit is, and what the new unit will be. Below is my code. I am confused on how to use if statements to compare the two. I have been trying to use ..
Im trying to compare the users input (username and password) with the user objects (eg user1, user5) to see if they match and if they do then the user will be directed into another activity because they would’ve been able to successfully logged in, and if not a message will be displayed. Ive created a ..
I want to compare two String objects coming out of two different lists and no matter if i use equals() contentEquals() or == it is always false has it something to do with how the strings of the first list are put into it? DictWord.dictWords.forEach { Log.i("testen", "it is: $it and equals ‘black’? – ${it.equals("black")}") ..
Recent Comments