00:01
In this video, we will create a program that displays a random uppercase letter using the math .d .random method.
00:07
I've already defined our class as well as the main method within it.
00:12
Since we're using math .d.
00:14
Random, we can go ahead and import java.
00:17
.mine.
00:18
Next, we can go into the main method and generate a random integer from 0 to 26, because we're going to want to index.
00:32
A string of the alphabet, so we can declare an n equals random times our range, 27, but we're going to want to cast this whole number as an int.
01:00
And n will give us a value from 0 to 26.
01:05
Next, we can create a string with each letter the alphabet capitalized.
01:10
Alternatively, you could do the lowercase alphabet and then use a function to make the selected letter uppercase, but just for simplicity, i've already capitalized each of the letters...