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); } }
Comments
Post a Comment