



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Constants do not change final datatype CONSTANTNAME = VALUE; final double PI = 3.14159; final int SIZE = 3;
x = 1; // Assign 1 to x; radius = 1.0; // Assign 1.0 to radius; a = 'A'; // Assign 'A' to a;
Implicit casting double d = 3 ; (type widening) Explicit casting int i = (int) 3. 0 ; (type narrowing) int i = (int)3.9; (Fraction part is truncated)