Thursday, August 13, 2020

write a java program for Narrow Type casting - Implicit Type Casting - Reduced Modulo

 class Con12 

{

public static void main(String[] args) 

{

int a=257;

byte b;;

        double c=323.142;

b=(byte)a;

System.out.println("a value is"+a+"b value is"+b);

b=(byte)c;

  System.out.println("c value is"+c+"b value is"+b);

    


}

}


No comments:

Post a Comment