Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ThirdAssignment {
- public static void main(String[] args) {
- char firstL = 'A'; //declaring first letter
- char lastL = 'Z';//declaring last letter
- //subtracting Z and A to see the difference, and Adding 1 to get the exact amount of letter.
- System.out.println("The amount of letters in the Alphabet is: " + (lastL - firstL + 1));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement