Image

Imagechixor1 wrote in Imagejava_dev

using methods in a switch?

Im keeping you busy, Im sorry.

My next question is regarding creating a switch.
I have 2 methods, one for converting temps to celsius, and one for converting temps to fahrenheit.
I would like the user to select which temperature conversion they want to choose.

i.e For C to F enter "1" for F to C enter "2"

I wanted to use switch (choice)
                           {
                               case1:
                                        "method 1"
                               Break;
                               case2:
                                         "method 2"
                               Break;
                               }

Is there anything special I would need to do to allow me to use the methods within this switch?