Character array question

Hi there, I’ve got a (hopefully easy) question regarding an array of characters/symbols that represent text. Like I have it below it doesn’t allow for one of the elements to be ‘F#’ (or anything with more than 1 symbol). Is there a way to have an array like this?

char[] string = {'C', 'E', 'G', 'B', 'F#'}; 
1 Like

String[] notes = { “A”, …

1 Like

Note that the “” gets distorted by my phone

Also, remember that == doesn’t work on Strings, use something.equals(“F#”) instead or use switch (notes[i]) {

See reference

Warm regards,

Christoph

1 Like

Hello,

https://processing.org/examples/charactersstrings.html

Get to know the resources available to you.

Resources < Click here to expand !

I encourage you to review the resources available here:

:)

1 Like

Ah, thanks Christoph! I did mess around with String but somehow didn’t arrive at that extremely easy solution lol…

1 Like