Line 17: |
Line 17: |
|
|
|
|
|
=== Iterate through an array === |
|
=== Iterate through an array === |
− |
{{codeblock|{{code|keyword|Did you know that}}{{code|whitespace| }}{{code|variable|Berry Punch}}{{code|whitespace| }}{{code|keyword|likes}}{{code|whitespace| }}{{code|type|the phrase}}{{code|whitespace| }}{{code|literal|“Cheerwine”}}{{code|punctuation|?}}{{code|whitespace|<BR/>}}{{code|keyword|For every}}{{code|whitespace| }}{{code|type|character}}{{code|whitespace| }}{{code|variable|c}}{{code|whitespace| }}{{code|keyword|in}}{{code|whitespace| }}{{code|variable|Berry Punch}}{{code|whitespace| }}{{code|punctuation|.}}{{code|punctuation|.}}{{code|punctuation|.}}{{code|whitespace|<BR/>}}{{code|keyword|I said}}{{code|whitespace| }}{{code|variable|c}}{{code|punctuation|.}}{{code|whitespace|<BR/>}}{{code|keyword|That's what I did}}{{code|punctuation|!}}}} |
+ |
{{codeblock|{{code|keyword|Did you know that}}{{code|whitespace| }}{{code|variable|Berry Punch's favorite thing to say}}{{code|whitespace| }}{{code|keyword|is}}{{code|whitespace| }}{{code|type|the word}}{{code|whitespace| }}{{code|literal|“Cheerwine”}}{{code|punctuation|?}}{{code|whitespace|<BR/>}}{{code|keyword|For every}}{{code|whitespace| }}{{code|type|character}}{{code|whitespace| }}{{code|variable|c}}{{code|whitespace| }}{{code|keyword|in}}{{code|whitespace| }}{{code|variable|Berry Punch's favorite thing to say}}{{code|whitespace| }}{{code|punctuation|.}}{{code|punctuation|.}}{{code|punctuation|.}}{{code|whitespace|<BR/>}}{{code|keyword|I said}}{{code|whitespace| }}{{code|variable|c}}{{code|punctuation|.}}{{code|whitespace|<BR/>}}{{code|keyword|That's what I did}}{{code|punctuation|!}}}} |
|
|
|
|
|
==== Java Equivalent ==== |
|
==== Java Equivalent ==== |
− |
{{codeblock|<SOURCE LANG=java>char[] BerryPunch = new char[]{'C','h','e','e','r','w','i','n','e'}; |
+ |
{{codeblock|<SOURCE LANG=java>char[] Berry_Punchs_favorite_thing_to_say = new char[]{'C','h','e','e','r','w','i','n','e'}; |
− |
for(char c : BerryPunch){;; |
+ |
for(char c : Berry_Punchs_favorite_thing_to_say){;; |
|
System.out.println(c); |
|
System.out.println(c); |
|
}</SOURCE>}} |
|
}</SOURCE>}} |