PackageHQ;/*** Declaration of Class *@authorLenovo **/ Public classLeixingzhuanhuan {/*** Declaration of Method *@paramargs * * * JAVA DOC * * **/ Public Static voidMain (string[] args) {//Data type Conversions inti=2;//4 bytes LongJ=i;//8 Bytes: Implicit conversions//automatically converts from a small range to a large range of types. Longh=i+J; System.out.println (h); I=(int) J;//Forced Conversions//forces a large conversion from a range into a small range of types. Doublek=123.45; I=(intK//Cast: Loss of Precision! System.out.println (k); System.out.println (i); //int x= (int) "123" numeric value and string cannot be converted directly//Conversion Prerequisites: Numeric type compatible//one of the return values is a double type and the other output is doubleSystem.out.println (H +k); System.out.println ((100<99?123.3:124)); //comments. //Block Comment/*......*///Document Comments/** * * */... Java documentation can be generated by Javadoc
Java Data transformation + annotations