Results 1 to 5 of 5
  1. #1
    lenaf7 is offline Member
    Join Date
    Oct 2012
    Posts
    1
    Rep Power
    0

    Default What does this assignment do

    system.out.println ("Blah = " + blah (x, 3));

    What is the purpose of 3, what is it doing?

  2. #2
    penguinCoder is offline Member
    Join Date
    Oct 2012
    Location
    Tempe, Arizona
    Posts
    77
    Blog Entries
    12
    Rep Power
    0

    Default Re: What does this assignment do

    It appears to be calling a static method with the parameters x and 3. It should display "Blah = [whatever the method returns]"

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,710
    Rep Power
    22

    Default Re: What does this assignment do

    Not necessarily static.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  4. #4
    penguinCoder is offline Member
    Join Date
    Oct 2012
    Location
    Tempe, Arizona
    Posts
    77
    Blog Entries
    12
    Rep Power
    0

    Default Re: What does this assignment do

    If it wasn't static, wouldn't you need some kind of keyword before it; super, this, objectName, etc?..

  5. #5
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,232
    Blog Entries
    7
    Rep Power
    24

    Default Re: What does this assignment do

    Quote Originally Posted by penguinCoder View Post
    If it wasn't static, wouldn't you need some kind of keyword before it; super, this, objectName, etc?..
    Nope, the method blah( ... ) only needs to be accessible from the current contex, e.g. private in the current class, protected in a superclass (or wider) etc.

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

Similar Threads

  1. Need help with assignment.
    By smileybear33 in forum New To Java
    Replies: 2
    Last Post: 04-26-2011, 03:47 AM
  2. Help with an assignment
    By aqeel2010 in forum New To Java
    Replies: 5
    Last Post: 01-14-2011, 10:04 AM
  3. assignment
    By mr.othman in forum New To Java
    Replies: 4
    Last Post: 12-03-2010, 03:55 PM
  4. Can anyone help me in my Assignment
    By nono in forum New To Java
    Replies: 18
    Last Post: 11-15-2010, 06:52 AM

Posting Permissions

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