# I don't even know how to ask for help with this i must just be missing something obvious

**URL:** <https://discourse.processing.org/t/i-dont-even-know-how-to-ask-for-help-with-this-i-must-just-be-missing-something-obvious/30604>\
**Category:** Beginners\
**Created:** [June 9, 2021, 3:39pm UTC](https://discourse.processing.org/t/i-dont-even-know-how-to-ask-for-help-with-this-i-must-just-be-missing-something-obvious/30604 "2021-06-09T15:39:33Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![canslp](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@canslp](https://discourse.processing.org/u/canslp)\
**Post date:** [June 9, 2021, 3:39pm UTC](https://discourse.processing.org/t/i-dont-even-know-how-to-ask-for-help-with-this-i-must-just-be-missing-something-obvious/30604/1 "2021-06-09T15:39:33Z")

</div>

![Screen Shot 2021-06-09 at 10.37.03 AM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/383f02c9f7c76668e75edb5647b75d24fe48cd41.png)

???

---

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [June 9, 2021, 3:42pm UTC](https://discourse.processing.org/t/i-dont-even-know-how-to-ask-for-help-with-this-i-must-just-be-missing-something-obvious/30604/2 "2021-06-09T15:42:37Z")

</div>

without the rest of the code its difficult to say where the error is occurring however index out of bounds means you’re trying to access an index that doesnt exists. So I’m guessing there might be an issue when you add data to camData.

---

<div class="post-metadata">

**Author:** ![canslp](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@canslp](https://discourse.processing.org/u/canslp)\
**Post date:** [June 9, 2021, 3:46pm UTC](https://discourse.processing.org/t/i-dont-even-know-how-to-ask-for-help-with-this-i-must-just-be-missing-something-obvious/30604/3 "2021-06-09T15:46:51Z")

</div>

the actual error i’m getting makes sense, i expected that error to happen when camData.get(0) was “\*”, that’s why i made the if else gate, to make sure it didn’t try to do that part of the code in that case. my question is why is the code even going to the else here. why is it returning false.

---

<div class="post-metadata">

**Author:** ![canslp](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@canslp](https://discourse.processing.org/u/canslp)\
**Post date:** [June 9, 2021, 3:52pm UTC](https://discourse.processing.org/t/i-dont-even-know-how-to-ask-for-help-with-this-i-must-just-be-missing-something-obvious/30604/4 "2021-06-09T15:52:14Z")

</div>

is it possible that it’s evaluating strings as unique objects?? so that’s why “asterisk” != “asterisk” because really it’s like are these two separate string objects, both of the value “\*”, the same object?

---

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [June 9, 2021, 3:57pm UTC](https://discourse.processing.org/t/i-dont-even-know-how-to-ask-for-help-with-this-i-must-just-be-missing-something-obvious/30604/5 "2021-06-09T15:57:34Z")

</div>

again its not return false, its return indexOutOfBounds, the value you are passing through get exceeds the size of your array.

Also the error is not suggesting any problem with the string conversion so thats not the issue. The issue is your array is of size one, meaning it contains only one object and you are trying to access object number 2 at index 1 and the compiler cannot find that index in the array.

---

<div class="post-metadata">

**Author:** ![canslp](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@canslp](https://discourse.processing.org/u/canslp)\
**Post date:** [June 9, 2021, 4:03pm UTC](https://discourse.processing.org/t/i-dont-even-know-how-to-ask-for-help-with-this-i-must-just-be-missing-something-obvious/30604/6 "2021-06-09T16:03:26Z")

</div>

i understand why the error is happening, my question is why is the code even executing that line. the if statement should return true in that case, because camData.get(0) is “\*”

---

<div class="post-metadata">

**Author:** ![canslp](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@canslp](https://discourse.processing.org/u/canslp)\
**Post date:** [June 9, 2021, 4:04pm UTC](https://discourse.processing.org/t/i-dont-even-know-how-to-ask-for-help-with-this-i-must-just-be-missing-something-obvious/30604/7 "2021-06-09T16:04:19Z")

</div>

solved! i was right it was treating camData.get(0) like an instance of a string object, not comparing the values. i just had to do .equals() instead of ==

---

<div class="post-metadata">

**Author:** ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Post date:** [June 9, 2021, 5:27pm UTC](https://discourse.processing.org/t/i-dont-even-know-how-to-ask-for-help-with-this-i-must-just-be-missing-something-obvious/30604/8 "2021-06-09T17:27:47Z")

</div>

Yeah, a similar issue happened to me. From what I understand, strings have a “start” and “end” value. They are treated as characters by the computer, but not displayed. So when you are comparing two strings, it doesn’t match.

```auto
String a = "abc", b="abc";
print( a==b ); //output -> TRUE

String c = "hi this is it!", d = "this";
String e[] = split(c," "); //splits into {"hi","this","is","it!"};
print(c[1] == d); //output -> FALSE

```
