Java Blog

 public class JAVA_018

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

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

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

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

          System.out.println(\"The Random Character Generated is not a letter\");

    Related Post:
  1. Define an array of ten String elements each containing an arbitrary string of the form “month/day/year”

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

  3. 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

  4. Program to show the use of If-Else Statement

  5. Program to show an example of creating a class and using its object

  6. Program, which creates a three thread. One thread display the numbers from 1 to 5, second thread display the square root of that number etc

  7. Program to read the price of an item in decimal form (like 75.95) and print the output in paise (like 7595 paise).

  8. corba program of client and a DNS server where given a URL the server sends back an IP address

  9. Program to read bytes from a file

  10. Program to find a factorial of a given number

  11. RMI based application, which reads a file with list of marks of student from a client, send it to server and find how many students having distinct

  12. Program of Floyds Triangle

  13. Program to show insertion of StringBuffer, String objects and other Basic Data Types into a StringBuffer object


  15. Program to print triangle of numbers

  16. Program to display reverse $ tree

  17. Corba program of UDP client server application which sends the news to the client. Server takes the news from the NewsDataFile located at the server

  18. Program to show the use of Logical or Boolean Negation i.e. NOT (!)

  19. Program that reads and writes random access file

  20. Program to show an example of using a Non-Static Nested Class

Didn't find what you were looking for? Find more on Program to show the use of Conditional AND Operator (&&) in If Statements