Java Blog

 
 
 
 public class JAVA_017
 {

    public static void main(String[] args)
    {
       char Symbol=\'\\0\';

       Symbol=(char)(Math.random( )*128);

       if(Symbol>=\'A\')
       {
          if(Symbol<=\'Z\')
             System.out.println(\"The Random Character Generated is a Capital Letter : \"+Symbol);

          else if(Symbol>=\'a\')
          {
             if(Symbol<=\'z\')
                System.out.println(\"The Random Character Generated is a Small Letter : \"+Symbol);

             else
                System.out.println(\"The Random Character Generated is a greater than \'a\' but it\'s not a letter\");
          }

          else
             System.out.println(\"The Random Character Generated is a less than \'a\' but it\'s not a letter\");
       }

       else
          System.out.println(\"The Random Character Generated is a less than \'A\' but it\'s not a letter\");
    }
 }

    Related Post:
  1. An applet program to draw concentric circle in center of the canvas

  2. CORBA based application for addition of two mathematical expressions of the form (ax + by) and displaying the result on client side

  3. An applet program to draw circle in center of the canvas

  4. Develop a game application in CORBA for which the player will guess a number between 1 to 100, which will be compared to the random number generated b

  5. Program to ask question and accept answer up to 3 attempt and display right answer if it is wrong

  6. Program to calculate the frequency for different values of C starting from 0.01 to 0.1 in steps of 0.01

  7. Program to show the use of Logical AND Operator (&) in If Statements

  8. Encrypt the text that you want to send on the client side. The server side decrypts it after receiving. Append server time after each word in the sent

  9. Program to show the use of Comparison operator (==) for comparing Strings

  10. Program of telnet server - client

  11. An applet program to add two numbers where data is entered in TextField

  12. Program to show an example of Overriding a Base Class Method

  13. An applet program of showing new document using showDocument(URL) method

  14. Program to show the use of Nested Loops

  15. Program of UDP news server

  16. Program to append a StringBuffer by StringBuffer, String objects and other Basic Data Types

  17. Program to read rollno, marks of sub1,sub2 and sub3 and on basis of that display result

  18. Program of linear search

  19. Corba program of reverse string

  20. File handling program to copy characters from one file to another

 
 
Didn't find what you were looking for? Find more on Program to show the use of Nested If-Else Statements