Davey Lopez wrote:
Is There an easier way to do this rather than linking strings together like in the code below
Davey Lopez wrote:Well I spoke to my professor He didn't like How I just stored the Uppercase letters in an array he wants me to cast them to char and use the ascii key code
Andrea, andbin.dev — SCJP 5 (91%) – SCWCD 5 (94%)
java.util.function Interfaces Cheat Sheet — Java Versions Cheat Sheet
Has OP noticed the out‑by‑one error yet?Henry Wong wrote:. . . You can do something like this...
String line1 = generator.nextInt(25) + 'A';
Henry
Davey Lopez wrote:Well I spoke to my professor He didn't like How I just stored the Uppercase letters in an array he wants me to cast them to char and use the ascii key code
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
There are three kinds of actuaries: those who can count, and those who can't.
Piet Souris wrote:Hmm... OP asked for an easier way, not for a more clever or elegant way.
And I do not find the alternatives easier than what the OP presented.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
There are three kinds of actuaries: those who can count, and those who can't.
Villains always have antidotes. They're funny that way. Here's an antidote disguised as a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|