boolean and java constants

Write a program to show use of boolean data type and constants of java.

 

import java.util.Scanner; class P08BooleanJavaConstant { public static void main() { int x, y; boolean b; System.out.println("Enter two integers "); Scanner in = new Scanner(System.in); x = in.nextInt(); y = in.nextInt(); b= x>y; System.out.println("\n Value in Boolean variable b " +b); System.out.println("\n Maximum value of Integer " +Integer.MAX_VALUE); System.out.println("\n Minimum value of Long data type " +Long.MIN_VALUE); } }




For any desired program, please comment below. We will try our best to make that program available.


Comments

Popular Posts