SHARE
TWEET

HomeWork 3

a guest Jul 22nd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. public class ThirdAssignment {
  4.     public static void main(String[] args) {
  5.  
  6.         char firstL = 'A'; //declaring first letter
  7.         char lastL = 'Z';//declaring last letter
  8.  
  9.         //subtracting Z and A to see the difference, and Adding 1 to get the exact amount of letter.
  10.         System.out.println("The amount of letters in the  Alphabet is: " + (lastL - firstL + 1));
  11.  
  12.  
  13.     }
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top