Results 1 to 4 of 4
  1. #1
    edelric666 is offline Member
    Join Date
    Oct 2010
    Posts
    12
    Rep Power
    0

    Default Whats the diffrence between a procedure call and decleration

    Hi, i have been proramming for about 2 weks know but only just realised that a procedure call and a procedure decleration are not the same thing. could someone please explain the diffrence?

    thanks =)

  2. #2
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Location
    Destiny Islands
    Posts
    692
    Rep Power
    5

    Default

    When you declare the method/procedure, you do something like this:
    Java Code:
    public void thisIsAMethod() {
      //Some code
    }
    From another method, you can call this:
    Java Code:
      someClass.thisIsAMethod();
    (This is also called invoking, if you want to know some other terms used.)

  3. #3
    edelric666 is offline Member
    Join Date
    Oct 2010
    Posts
    12
    Rep Power
    0

    Default

    oh okay thanks, do you think this analogy makes sense? : declaring a method is like mixing flour and eggs to make a cake for a TV show, and calling a method is like saying "here is one i made earlier" and taking out an old mix that has already been made.

    its just i find it much easier to learn and explain this stuff if it has nothing to do with programs as suck but is more like a real life situation.

  4. #4
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    No. Declaring a method is more like writing down the recipe and calling it actually putting that recipe to use.

Similar Threads

  1. Call Oracle procedure
    By take5 in forum JDBC
    Replies: 0
    Last Post: 06-01-2010, 11:18 AM
  2. call a pl/sql procedure through a jsp page
    By mudit222 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 04-20-2010, 09:02 PM
  3. How to call Oracle stored procedure from Java?
    By parag_narkhede in forum New To Java
    Replies: 4
    Last Post: 10-07-2009, 08:50 AM
  4. Duplicate XML decleration
    By gyl2009 in forum XML
    Replies: 0
    Last Post: 03-11-2009, 06:13 PM
  5. HELP: decleration and intialization in loops?
    By rjuyal in forum New To Java
    Replies: 10
    Last Post: 04-08-2008, 09:24 AM

Tags for this Thread

Posting Permissions

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