Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Java 03: Functions

Loading...

Sign in or sign up now!
29,224
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 13, 2007

Java 1.6 with NetBeans 5.5.1 beta

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 5 dislikes

Link to this comment:

Share to:

Uploader Comments (gorilla3d)

  • Will someone, please, explain to a novice what it means when a function returns or doesn't return something? Return where? And what is the difference?

  • When a function returns something you can used that returned value.

    ie.

    function add($v1, $v2) {

     return $v1 + $v2;

    }

    $myvalue = add(1, 2);

    // now $myvalue = 3

    If you never had a return value then it wont be possible to have $myvalue = 3

Top Comments

  • not clear too advanced for a beginer

  • his using netbeans lool

see all

All Comments (20)

Sign In or Sign Up now to post a comment!
  • can you help me to solve this problem?

    i really need to solve this. . . .

  • 5.write a program that will compute for n! which is the product of all number from 1 ton? then can you convert in function please. . . .tnx :-)

  • can you help me for my java problem

    1. write a program that will ask the user to enter a number n and display the number from 1 to n on single line?

    2.write a program that will display the even number from 1 to 100?

    3.given the value of n from the user, write a program that will display the first n even number. Ex. if n=5, then display the first 5 even integers which are 2,4,6,8,10?

    4.write a program which accepts a number n and displays the sum of even numbers from 1 to n?

  • @stedav functions and methods are the same thing. Method is just the name that they receive talking about object oriented programming, but actually it is the same thing after all, it's like synonims.

  • yeah thats true its called methods

  • Just a point, in Java we use the term Methods for not functions, that's JavaScript!

  • Thank you very much.

  • not very clear

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more