티스토리 뷰

The Double class wraps a value of the primitive type double in an object. An object of type Double contains a single field whose type is double. In addition, this class provides several methods for converting a double to a String and a String to a double, as well as other constants and methods useful when dealing with a double.


1. double 형 숫자를 String으로 변환


String strTemp = Double.toString(1.23456);


The String class represents character strings. All string literals in Java programs, such as "abc", are implemented as instances of this class. Strings are constant; their values cannot be changed after they are created. String buffers support mutable strings. Because String objects are immutable they can be shared. For example:


2. String형 숫자를 double형으로 변환


double dTemp = Double.parseDouble("1.23456");

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2025/12   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
글 보관함