asked 164k views
4 votes
How would you declare a variable x of type double and set it equal to 25.25? In JAVA

How would you declare a variable x of type double and set it equal to 25.25? In JAVA-example-1
asked
User Juvenik
by
8.6k points

1 Answer

7 votes

In java, you have to use the double keyword.

double x = 25.25;

You have to end the statement with a semi-colon. I hope this helps!

answered
User Patc
by
8.0k points

No related questions found