Anonymous user
Phrase reversals: Difference between revisions
m
→{{header|Java}}: Typign is hard, OK?
(+Java, not as concise as the others :() |
m (→{{header|Java}}: Typign is hard, OK?) |
||
Line 52:
String str = "rosetta code phrase reversal";
System.out.println("
String[] words = str.split(" ");
for(int i = 0; i < words.length; i++){
Line 62:
}</lang>
{{out}}
<pre>
Reversed words: attesor edoc esarhp lasrever
Reversed word order: reversal phrase code rosetta</pre>
=={{header|Python}}==
<lang python>>>> phrase = "rosetta code phrase reversal"
|