Hey guys!
I am looking at some sample code and noticing that processing takes both (double) numb and double(numb) as if they are the same but something like below has to be like the second one. I've seen this type of thing a couple of times now and don't get what the difference is so I don't know when to use it...
*WordItem is a classm words is a HashMap, word is a string
WordItem item = WordItem(words.get(word));<--NO WORK
(WordItem) words.get(word) <--WORKS
I can give more examples if you want.
Thanks!
McK
I am looking at some sample code and noticing that processing takes both (double) numb and double(numb) as if they are the same but something like below has to be like the second one. I've seen this type of thing a couple of times now and don't get what the difference is so I don't know when to use it...
*WordItem is a classm words is a HashMap, word is a string
WordItem item = WordItem(words.get(word));<--NO WORK
(WordItem) words.get(word) <--WORKS
I can give more examples if you want.
Thanks!
McK
1