![]() For convenience ofĭescription, the specific conversions that are possible in the Depending on theĪctual run-time value, information may be lost.Ĭertain specific conversions are permitted. ![]() Value to the 64-bit integer representation. Requires a nontrivial translation from a 64-bit floating-point No information is lost.Ī conversion from type double to type long Requires run-time sign-extension of a 32-bit integer value to theĦ4-bit long representation. So any reference produced by an expression of type Thread is a Requires no run-time action Thread is a subclass of Object, Requires a run-time check to make sure that the run-time value isĪctually an instance of class Thread or one of its subclasses Ī conversion from type Thread to type Object Into a form appropriate for the new type T.Ī conversion from type Object to type Thread The conversion or to translate the run-time value of the expression Require a corresponding action at run time to check the validity of S to type T allows an expression of type S to be treated atĬompile time as if it had type T instead. The type of the expression to a type acceptable for its surrounding Java programming language performs an implicit conversion from The programmer to indicate a type conversion explicitly, the ![]() To the type of the expression as a convenience, rather than requiring Other cases, the context may be able to accept a type that is related In some cases, this leads to an error at compile time. ![]() It is possible, however, to write anĮxpression in a context where the type of the expression is notĪppropriate. Java programming language has a type that can be deduced from the structure of theĮxpression and the types of the literals, variables, and methods Widening and Narrowing Primitive Conversion 5.1.5. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |