概述
java 基本数据类型之间的转换(Conversion between Java basic data types)
java 基本数据类型之间的转换(Conversion between Java basic data types)
Java conversion between basic data types - columns of fishinhouse - CSDNBlog fishinhouse's column
The hardest thing to do is to begin, and most importantly, to persist. If you persist, you will achieve your aim!
Login, register, total station, current blog space, blog buddy, album, message, WL, ID:fishinhouse
Java conversion between basic data types
A new common log4j configuration | old a 30 piece of advice: Java code
We know that the Java data types are divided into three categories, namely boolean type, character type and value type, which is divided into numerical integral and floating-point types; compared with the data type Java is a boolean variable type character type Boolean; char; byte, short, int, integer long; floating point float double. The four integer variables and the two floating point variables correspond to different precision and range respectively. In addition, we often use two kinds of variables, namely String and Date. For these variables, conversions between types are often used in programming, and in the following discussion, we will explain how to implement these transformations.
1 types of data type conversions
Java data type conversion generally divided into three kinds, namely:
(1) conversion between simple data types
(2) conversion of strings to other data types
(3) other practical data type conversions
Next, we discuss these three types of transformations.
2 conversion between simple data types
In Java, integer, real, and character types are treated as simple data types, which are from lower to higher (byte, short, char) --int--long--float--double
Conversions between simple data types can be divided into:
Low level to advanced automatic type conversion
? advanced to low-level forced type conversions
Packing type transition type can be converted
2.1 automatic type conversion
Low level variables can be directly converted into advanced variables, which the author calls automatic
最后
以上就是幸福保温杯为你收集整理的java conversion_java 基本数据类型之间的转换(Conversion between Java basic data types).doc...的全部内容,希望文章能够帮你解决java conversion_java 基本数据类型之间的转换(Conversion between Java basic data types).doc...所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复