Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Methods vs Functions in Java

  1. #1
    Junior Member
    Join Date
    Aug 2023
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Methods vs Functions in Java

    Is there a difference between Methods and Functions in Java? if yes are they physical or logical entity?

    do they occupy memory or not?

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Methods vs Functions in Java

    I think java has methods and C has functions.
    Basically they are the same thing.

    A method's code is included in the class file.
    It is possible that a compiler can optimize a method into inline code.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Aug 2023
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Methods vs Functions in Java

    So you're not sure..?

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Methods vs Functions in Java

    About what?
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts
    If you don't understand my answer, don't ignore it, ask a question.

  6. #6
    Member Helium c2's Avatar
    Join Date
    Nov 2023
    Location
    Kekaha, Kaua'i
    Posts
    102
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Methods vs Functions in Java

    I understand some of the things being said here. I also understand wlndows is the most widely used for the general public. Desktop or chrome book. Methods and functions. But basic whether Java or Windows, both programming language possess the same intended results. Java works on windows also. Like the JRE. They possess the same operational functions. C or C++ is just more task oriented. Java also being task oriented. Like downloading or uploading task. I see now. Getting clearer on why I think I might want to learn Java.

Similar Threads

  1. Java - Problem getting my program functions
    By maths94 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 4th, 2014, 02:42 AM
  2. Java sound functions + emails
    By deanbyrne95 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: March 26th, 2013, 07:44 AM
  3. how to execute Xquery-Functions in java????
    By shobanakannan in forum What's Wrong With My Code?
    Replies: 0
    Last Post: February 4th, 2013, 01:27 AM
  4. Help me understand when to use static on functions/methods
    By thenk24 in forum Java Theory & Questions
    Replies: 3
    Last Post: October 1st, 2011, 11:42 AM
  5. Calling Existing DLL functions using java...
    By orihsoyk in forum Java Theory & Questions
    Replies: 0
    Last Post: April 6th, 2011, 07:23 AM

Tags for this Thread