Skip to content

Instantly share code, notes, and snippets.

@youngjinmo
Last active September 14, 2019 13:56
Show Gist options
  • Save youngjinmo/c9498d280529e359fd8dec68342cf055 to your computer and use it in GitHub Desktop.
Save youngjinmo/c9498d280529e359fd8dec68342cf055 to your computer and use it in GitHub Desktop.
double형으로 형변환 하는 방법
public class toDouble {
public static void main(String[] args){
int a = 66;
double b = 3.456;
String c = "90";
char d = 'd';
System.out.println("Integer to double : " + (double)a);
// Integer to double : 66.0
System.out.println("DataType Check : "+(double)a==a);
// DataType Check : true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment