float, you will get a
float. If you add a
doubleyou will get a
The format used in the descriptions below is:
String, all operands are converted to
Strings and are then concatenated together. So,
3.4 + 5;
"One is "+1+" and all alone";
%value_2. This operator is useful only if value_1 and value_2 are both integers, in which case it is equvalent to
classas its type, value must be an object of type
class. If variable is one of the primitive data types, then promotion is allowed as described above.
int x=3; int y=x++; System.out.println("x is "+x+". y is "+y+".");would output x is 4. y is 3. whereas
int x=3; int y=++x; System.out.println("x is "+x+". y is "+y+".");would output x is 4. y is 4..
|6.8 Boolean Operators|