2/12/2017 8:55:42 AM
Poramet Supakitruengroj4 Answers
New AnswerA variable cannot have two different data types. It can be a string or a double. But you can do this. String str = "12.5"; double num = Double.parseDouble(str); First you can create string with double type value but it will be string only and then you can convert it to double.
if I want to check a=me and run like this String a="me"; if a="me" { System.out.print("ok"); } it cant run if because a is string. so how can i do like this? thanks for helping :)
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message