I don't know what you mean, but nasty conventions.
|
|
title say all. so I mean like this
anyway I get error when I use switch for double..Code:double test = 0.0; void test(){ switch(test){ }}
Code:Questhander.java:38: possible loss of precision found : double required: int switch(QuestDialogue) { ^ 1 error

I don't know what you mean, but nasty conventions.

In java switch statement works only with int and byte type variables.
As for the other data types: just use if / else if / else statements.

Bit late but its something like Integer.parseDouble(double)

That'll round it to the nearest whole number.Code:switch((int) test) { }



| « Skulling Final Devo 2.7 | Npc First Click. Rep+ » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |