Java Blog

 
 
 
 public class JAVA_023
 {

    public static void main(String[] args)
    {
       int number=(int)(Math.random( )*100);

       System.out.println(\"Random Generated Number ( \" + number + \" ) is : \"
                                             + ((number%2)==0?\"Even\":\"Odd\"));
    }
 }

    Related Post:
  1. Corba program to encrypt the text that you want to send on the client side. The server side decrypts it after receiving. Append server time.

  2. An applet program showing Clicked Event on canvas

  3. Program to declare and initialize Boolean variables and print them on the Standard Output Device

  4. Program to display reverse $ tree

  5. Program in CORBA which takes a long sentence from the client (at least 7 words), passes to the server, server separates out each word

  6. Program to read input from the Standard Input Device

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

  8. Program to read command line arguments

  9. Program sets up a String variable containing a paragraph of text of your choice. Extract the words from the text and sort them into alphabetical order

  10. An applet program to find maximum of three numbers using textField

  11. Program to show the use of Switch Statement for the same statement for several different case labels

  12. Program which calls the method sort(int []a) which throws the Exception ArithmeticException, NullPointerException, ArrayIndexOutOfBoundsException

  13. Program to show an example of modifying String objects

  14. Program that reads and writes random access file

  15. Program to show an example of using constructors in a class to initialize its data members

  16. Program to determine the sum of the following harmonic series for a given value of n

  17. Program to print triangle of numbers

  18. Program to show the use of Bitwise Operator (|) OR

  19. Program of telnet server - client

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

 
 
Didn't find what you were looking for? Find more on Program to show the use of Conditional (Ternary) Operator