Results 1 to 2 of 2
  1. #1
    jneal is offline Member
    Join Date
    Feb 2009
    Posts
    1
    Rep Power
    0

    Default Help with This program

    how would i return false from the method? I am drawing a complete blank for some reason. Thanks in advance. Nevermind figured it out.
    Last edited by jneal; 02-06-2009 at 11:19 PM. Reason: delete

  2. #2
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    7

    Default For the future...

    For those who open this post...
    Just return a boolean from the method:

    Java Code:
    public [B][COLOR="Blue"]boolean[/COLOR][/B] MyMethod()
    {
      boolean booVar; //define boolean variable
      .
      .
      .
      //do stuff... calculate... etc
      booVar = true;
      .
      .
      .
      [B][COLOR="blue"]return booVar;[/COLOR][/B] //return the boolean result to the calling method
    }
    Luck,
    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

Similar Threads

  1. Executing a program within a program
    By gibsonrocker800 in forum New To Java
    Replies: 5
    Last Post: 05-12-2008, 08:24 AM
  2. Replies: 0
    Last Post: 04-04-2008, 02:40 PM
  3. Replies: 0
    Last Post: 10-04-2007, 09:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •