Results 1 to 5 of 5

Thread: method in a method

  1. #1
    Junior Member
    Join Date
    May 2007
    Answers
    15

    method in a method

    Is it possible define method with in a method ?

    for eg:

    int dis(int a)
    {
    String d ;

    float foo() {

    }
    }


  2. #2
    Junior Member
    Join Date
    Dec 2006
    Answers
    9

    Re: method in a method

    I think it is not possible in Java.


  3. #3
    Expert Member
    Join Date
    Nov 2006
    Answers
    518

    Re: method in a method

    There could be a function call within the definition of another function but not a function definition.

    Lack of WILL POWER has caused more failure than
    lack of INTELLIGENCE or ABILITY.

    -sutnarcha-

  4. #4
    Junior Member
    Join Date
    Apr 2007
    Answers
    6

    Re: method in a method

    this is possible in c++, but not sure about java


  5. #5
    Junior Member
    Join Date
    Jun 2007
    Answers
    9

    Re: method in a method

    hi
    it's not possible to define method inside method..
    java doesn't support inner metods


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact