티스토리 뷰
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");
'프로그래밍 > JAVA & Android' 카테고리의 다른 글
[안드로이드] 안드로이드 스튜디오 소스코드 펼치기/접는 방법 (0) | 2020.07.09 |
---|---|
ArrayList 역순으로 재정렬하기 (0) | 2019.06.05 |
[Android] Toast 메세지 띄우기 (0) | 2018.06.28 |
[Android] 배터리 정보 가져오기 (0) | 2018.06.28 |
- Total
- Today
- Yesterday