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 4 of 4

Thread: problem: calling a function in Intellij (Beginner)

  1. #1
    Junior Member
    Join Date
    Dec 2018
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default problem: calling a function in Intellij (Beginner)

    Hey guys,

    Any one can help me out with this? Trying to call a function in Intellij, no idea where the bug is.

    it comments " invalid method declaration; return type required. " I not creating a new function, just trying to call. Think I may got the IDE misunderstood me somewhere.

    Thanks!
    Attached Images Attached Images

  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: problem: calling a function in Intellij (Beginner)

    Please post your code here, not an image.
    Also copy the full text of the error message.

    Please be sure to wrap your code with code tags:

    [code]
    **YOUR CODE GOES HERE**
    [/code]

    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Dec 2018
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: problem: calling a function in Intellij (Beginner)

    You're calling System.out.println outside of a function. Either put that statement in main or the average function.

  4. #4
    Member
    Join Date
    Sep 2018
    Location
    Virginia
    Posts
    284
    My Mood
    Cool
    Thanks
    0
    Thanked 38 Times in 36 Posts

    Default Re: problem: calling a function in Intellij (Beginner)

    Please don't post images of code. Copy and paste your code between code tags as previously shown.

    Regards,
    Jim

Similar Threads

  1. problem in calling a method
    By quasarLie in forum What's Wrong With My Code?
    Replies: 8
    Last Post: January 14th, 2018, 08:59 AM
  2. Calling Public Function in JInnternalFrame
    By mfrigon in forum What's Wrong With My Code?
    Replies: 3
    Last Post: August 31st, 2014, 01:41 PM
  3. What is Wrong When calling the function using arrayList.
    By nutan in forum What's Wrong With My Code?
    Replies: 5
    Last Post: March 26th, 2013, 07:30 AM
  4. Problem with onModuleLoad() calling-GWT
    By IliaPrikhodko in forum Web Frameworks
    Replies: 1
    Last Post: August 11th, 2011, 07:12 AM
  5. Problem with Return Function
    By Tracy22 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: October 26th, 2010, 03:32 PM