Search:

Type: Posts; User: JavaDaveUK

Search: Search took 0.10 seconds.

  1. Re: Having trouble with an if statement. please help!!

    sorry my mistake, remove the else at the end, so the return is guaranteed.

    ie.


    if ((aNumber > 0) && (aNumber < 5))
    {
    ... set diff. settings based on 1 to 4
    ..etc...
  2. Re: Having trouble with an if statement. please help!!

    are you sure you have the else from the first if, not the if that results in the high setting.

    i.e.


    if ((aNumber > 0) && (aNumber < 5))
    {
    ... set diff. settings based on 1 to 4...
  3. Re: Having trouble with an if statement. please help!!

    How about this!



    public String whatSetting(int aNumber)
    {
    if ((aNumber > 0) && (aNumber < 5))
    {
    this.setting = aNumber;
    if...
Results 1 to 3 of 3