conditional boolean_expressionvalue_if_truevalue_if_false assignment +-*/%>>>>=&^we have now discussed almost all of the operators listed in table notable exception is the conditional operatorwhich involves evaluating boolean expression and then taking on the appropriate value depending on whether this boolean expression is true or false (we discuss the use of the instanceof operator in the next casting and autoboxing/unboxing in expressions casting is an operation that allows us to change the type of variable in essencewe can take variable of one type and cast it into an equivalent variable of another type casting can be useful for doing certain numerical and input/output operations the syntax for casting an expression to desired type is as follows(typeexp where type is the type that we would like the expression exp to have there are two fundamental types of casting that can be done in java we can either cast with respect to the base numerical types or we can cast with respect to objects herewe discuss how to perform casting of numerical and string typesand we discuss object casting in section for instanceit might be helpful to cast an int to double in order to perform operations like division ordinary casting when casting from double to an intwe may lose precision this means that the resulting double value will be rounded down but we can cast an int to double without this worry for exampleconsider the following