Java illustration code to banking concern agree if a give away is even, strange or prime

package com.as400samplecode;  populace aeroplane CheckMyNumber {      populace static void main(String[] args) {          boolean fifty-fifty = false;         boolean prime number = true;         int myNumber = Integer.parseInt(args[0].trim());          if(myNumber % 2 == 0){             fifty-fifty = true;             prime number = false;         }         else {             for(int i=3; i*i<=myNumber; i+=2) {                 if(myNumber % i == 0) {                     prime number = false;                 }             }         }          if(even){             System.out.println("The given release is Even.");         }         else {             if(prime){                 System.out.println("The given release is Prime.");             }             else {                 System.out.println("The given release is Odd.");             }         }     }  } 
  • Even number
    • An fifty-fifty release is an integer which is a multiple of two. If it is divided past times 2 the termination is about other integer. Zero is an fifty-fifty release because null multiplied past times 2 is zero
  • Odd number
    • An strange release is an integer of the cast n=2k+1, where k is an integer. Odd numbers run out a residuum of one when divided past times two.
  • Prime number
    • A prime number release (or a prime) is a natural release greater than one that has no positive divisors other than one together with itself.


Sumber http://www.mysamplecode.com/