Error: Cannot make a static reference to the non-static method

Below is a java code. I attempt to call method1 and method2 and I got this error:
Cannot make a static reference to the non-static method but If I add the keyword static in front of my method1 and method2 then I would be freely call the methods with no error!
Anyone has an idea about such error? and I wrote all code in the same one file.
public class Lab1 {
     public static void main(String[] args) {
          method1(); //error
     public  void method1 ()
     public  void method2 ()
}

See the Search Forums at the left of the screen?
If you had searched with "Cannot make a static reference to the non-static method"
http://search.sun.com/search/onesearch/index.jsp?qt=Cannot+make+a+static+reference+to+the+non-static+method+&rfsubcat=siteforumid%3Ajava54&col=developer-forums
you would have the answer. Almost every question you will ask has already been asked and answered.

Similar Messages

  • When tried to upgrade iphone 4S from 8.1.2 to 8.1.3 it crushed at the middle, after it it not let it tern on and cannot make recovery and crush in the middle of the process with "could not be restored. An unknown error occurred (3014)"

    When tried to upgrade iphone 4S from 8.1.2 to 8.1.3 it crushed at the middle.
    After it it not let it tern on and cannot make recovery and crush in the middle of the process with "could not be restored. An unknown error occurred (3014)"

    Hi bahaluly,
    Thanks for using Apple Support Communities. Based on what you stated, it sounds like you are not able to update the iPhone. I would recommend that you read this article, it may be able to help the issue.
    Get help with iOS update and restore errors - Apple Support
    Solve network errors
    Related errors: 17, 1638, 3014, 3194, 3000, 3002, 3004, 3013, 3014, 3015, 3194, 3200, or "There was a problem downloading the software," or "The device isn't eligible for the requested build." These alerts mean that your computer is either having difficulty contacting the Apple update server or communicating with your device. 
    Check your computer for software or settings that might cause communication issues between your computer and Apple or between your computer and your device.
    Cheers,
    Mario

  • After I've upgraded my iPhone iOS to 5.0.1, I got problems with connectivity. If my iPhone lose network, then it gets frozzen and I cannot make calls. After restart the telephone still does not work.

    After I've upgraded my iPhone iOS to 5.0.1, I got problems with connectivity. If my iPhone lose network, then it gets frozzen and I cannot make calls. After restart the telephone still does not work.

    1. Download the iOS 5.0.1: http://www.tobias-hartmann.net/2011/11/download-ios-5-0-1-veroffentlicht-direkte -downloadlinks/
    2. open itunes,Click in iTunes while holding down the Shift key (on Windows) or Alt key (Mac) to restore and firmware

  • I want to change my account payment method to none and I do not have a credit card yet.Plus, iTunes gave a message saying that I need to review my account and when I go there,the none payment method is hidden.

    I want to change my account payment method to none and I do not have a credit card yet.Plus, iTunes gave a message saying that I need to review my account and when I go there,the none payment method is hidden.

    Assuming that you want help and that you aren't just copying-and-pasting that thread's title and posting a link to it, then have you tried the steps on the post that I linked to in my first reply on that thread ?
    If you don't get the 'none' option when trying those instructions then you will need to enter credit card details before you will be able to use the account - when you've entered credit card details you should get the 'none' option and be able to remove your card details.
    Or you can create a new account, and follow, exactly, the steps on this page when creating it' : http://support.apple.com/kb/HT2534

  • Error  : Sales order 'create with Reference' to the contract

    We have made a value contract. Now we are trying to make a Sales order 'create with Reference' to the contract.
    when we do that, we am getting error 'copying material in any value contract item is not permitted'
    Any help or directions would be greatly appreciated . We are on Ecc 6.0
    Rohit

    As of now my value contract has just one material. so i dont need assortment module settings. right?
    in VTAA settings are as follows
    Target type: OR  
    Source type: ZK1
    there is only on item category
    Target item category: TAN   
    Source item category: WKN
    Copying requirement : 301
    update doc flow : 2
    pricing type : C
    cont item copy mode : A
    DataT am using 151,102,002
    There are no schedule line.
    Rohit
    Edited by: rohit kumar on May 15, 2008 7:36 PM

  • Creatice cloud download error cannot make folder

    I'm trying to download the Light Room trial and get an error starting creative cloud:  "cookies dir:  cannot make folder/cookies:  Permission denied (error 13)
    Does anyone have any idea how to fix this?   I'm on firefox and an iMac.

    Re: Installing Creative Cloud Desktop but I got Error 13 an issue permission on my MacBookPro, why?

  • Cannot make DHCP reservation out of the DHCP pool

    Hello,
    I foud a bug in the router:
    I am using network 172.16.20.0 with subnet 255.255.252.0 wich means i can use IP adresses from 172.16.20.1 until 172.16.23.254.
    When i setup my DHCP server on the router (from 172.16.20.1 to 172.16.20.100) i cannot make a DHCP reservation outside of this DHCP pool.
    Is there a workaround or am i doing something wrong?
    Thanks in advance.

    This is normal networking standards. When a DHCP pool is set up, only reservations work with in this pool. You can set up static IPs out side this pool if needed. Which is recommended for printer, NAS and low priority devices.

  • Error : Cannot make multiple postings to area 31 - Message AA756

    You cannot make multiple postings to area 31.
    Message no. AA756
    Diagnosis
    The depreciation posting run was interrupted due to an incorrect setting in Customizing.
    Procedure
    The system carries out a check of the depreciation areas to be posted during the depreciation posting run.  During this check, the system determined that multiple postings were to be made to depreciation area 31.  This multiple posting problem was caused by the incorrect configuration in Customizing of the areas to be posted.
    Area 31 is automatically posted due to a currency connection with area 01, and is posted again either on its own, or through a currency connection with a third depreciation area.
    Check the configuration for the posting of depreciation
    I made all the settings required. I appreciate any one who can help in this regard.
    Thanks,
    Pradeep

    Hi:
            Please refer to OSS  Note 551000 - AFAB: Error AA756 when pressing Enter.  Normally depreciation can not receive more than one postings. it might be possible that your deprecation area is getting posting from 01 and getting the self postings and this might be happening becuase of configuration .Please check configuration of all depreciation areas which you have and check whether all depreciation areas are posting to 31.
    Regards

  • Ftp error - cannot make connection

    Using Dreamweaver CS3 on Microsoft XP. When I try and set up
    ftp for our web site in Site Manager, to allow files to be checked
    in and out, it does not work. The error message is "An FTP error
    occurred - cannot make connection to host. Your login or password
    is incorrect." It is possible to create an ftp connection to the
    same site in Dreamweaver using the other option in Site Manager,
    "Connect to an FTP server without defining a site ". The only
    diffrence I can see in the configuration is that the screen for
    this option includes the field "URL Prefix". Can anyone help?
    Thanks.

    I think the thing has got sorted. I tried putting in the
    Control panel password, which didn't work, and when I tried it
    again with the ftp password it did. No rational explanation. Thank
    you.

  • FTP Error - cannot make connection to host.

    Hello! Have been searching through the forums and have seen
    some topics that are similar to the problem I am facing but have
    not found one to solve it yet. I connect to mulitple FTP servers
    through Dreamweaver to upload and manage sites. As of late I will
    will try and connect to make updates and I keep on getting this
    error maessage....
    An FTP Error occurres - cannot make connection to host.
    It has happened on multiple servers from various providers. I
    am convinced that it is a Dreamweaver issue or a connection issue
    on my system. Any thoughts, help, or ideas to fix the problem would
    be greatly appreciated.
    I have tried most of the things out there on the boards but
    nothing has worked for me. The odd thing is that earlier today I
    was uploading through FTP on one of my sites and now that one won't
    work. Another site has been giving me hassle for days. Please any
    help would be much appreciated! I thank you for any time spent
    ahead of time answering this post! Blessings!

    Sorry it took so long to paste this in. It took this long for
    me to find it! k
    220-
    220-Welcome to the Comcast High-Speed Internet Personal Web
    Pages FTP server 204.127.198.23
    220-You are accessing it from host 207.174.254.41
    220-at Wed Feb 14 18:20:44 2007 GMT
    220-
    220-This is the "Access from Anywhere" PWP FTP server, and is
    available
    220-from the general internet.
    220-
    220-To access PWP FTP Server you can also use an SSL enabled
    FTP client.
    220-A list of such clients can be found at:
    220-
    220-
    http://home.comcast.net/ftp_anywhere.html
    220-
    220-For more tips on how to configure your FTP or Web
    Publishing
    220-software to work with Personal Web Pages, please follow
    220-the instructions on these web pages:
    220-
    220-
    http://help.comcast.net
    220-
    220- ****IMPORTANT****
    220-
    220-Any access to and use of this FTP server, authorized or
    220-unauthorized, is governed by and constitutes your
    acceptance of
    220-the terms and conditions imposed on the following web
    page:
    220-
    220-
    http://commcenter.comcast.net/terms/index.jsp
    220-
    220-Use your E-mail Username at the login prompt (the portion
    before the "@").
    220-Use your E-mail Password at the password prompt.
    220-
    220-
    220 PWPFTPD 2.02 (6feb2002) Server (Comcast High-Speed
    Internet Personal Web Pages FTP server) [204.127.198.23]
    USER xxxxx
    331 Password required for xxxx.
    PASS
    230 User xxxx logged in.
    SYST
    215 UNIX Type: L8
    PWD
    257 "/" is current directory.
    CWD /
    http://home.comcast.net/~xxxxx
    550 /
    http://home.comcast.net/~xxxx:
    No such file or directory
    QUIT
    Using port
    //upload.comcast.net
    220-
    220-Welcome to the Comcast High-Speed Internet Personal Web
    Pages FTP server 204.127.198.23
    220-You are accessing it from host 207.174.254.41
    220-at Wed Feb 14 18:56:41 2007 GMT
    220-
    220-This is the "Access from Anywhere" PWP FTP server, and is
    available
    220-from the general internet.
    220-
    220-To access PWP FTP Server you can also use an SSL enabled
    FTP client.
    220-A list of such clients can be found at:
    220-
    220-
    http://home.comcast.net/ftp_anywhere.html
    220-
    220-For more tips on how to configure your FTP or Web
    Publishing
    220-software to work with Personal Web Pages, please follow
    220-the instructions on these web pages:
    220-
    220-
    http://help.comcast.net
    220-
    220- ****IMPORTANT****
    220-
    220-Any access to and use of this FTP server, authorized or
    220-unauthorized, is governed by and constitutes your
    acceptance of
    220-the terms and conditions imposed on the following web
    page:
    220-
    220-
    http://commcenter.comcast.net/terms/index.jsp
    220-
    220-Use your E-mail Username at the login prompt (the portion
    before the "@").
    220-Use your E-mail Password at the password prompt.
    220-
    220-
    220 PWPFTPD 2.02 (6feb2002) Server (Comcast High-Speed
    Internet Personal Web Pages FTP server) [204.127.198.23]
    USER xxxxx
    331 Password required for xxxxx.
    PASS
    230 User xxx logged in.
    SYST
    215 UNIX Type: L8
    PWD
    257 "/" is current directory.
    CWD /
    http://home.comcast.net/~xxx
    550 /
    http://home.comcast.net/~xxxxx:
    No such file or directory

  • Cannot pick up calls on wait, Cannot make a second call holding the first call

    I have a really weird problem with my iPhone 5S. (iOS 7.1)
    1. When I am on a call, I am not able to pick up a second call that is on wait. I can see the second call, I can hear the beep sounds but as soon as I pick up, the call freezes in 00.00 time, and My first caller is still active, not on hold.
    2. When I am on a call, I am not able to make a second call placing the first call on hold. The second call disconnects immediately with 3 beeps.
    3. I am able to see the incoming calls on wait, when I am already on a call. I am able to hear the beeps coming in. SO it means the call waiting is on (Tried turning it on/off/on too.) But when I pick up the call, the above problem comes in.
    What have I tried to solve this: (None of them helped)
    1. I tried a hard reset of my iPhone (Holding Power and Home button)
    2. I tried toggling the Call waiting button
    3. I tried resetting network settings.
    4. I called my Operator for assistance. I am using Airtel, India. They told me to dial this code - *43# . I tried it and it gave me this screen. But the problem is not solved yet.
    Is there anybody here who is facing the same issue with your iPhone? I never had this problem with my iPhone 4.

    Make sure you do not have "Do Not Disturb" turned on. This feature will block the first call, but is someone calls right back it will be put through.
    On the iPhone, go to Settings/Do Not Disturb
    Make sure you do not have Do Not Disturb turned on manual or scheduled.

  • Method reference of the currently executed method

    Hello,
    is there a way (i think using reflection) to have a reference to a Method object of the currently executed method?
    class A {
         void foo() {
              java.lang.reflect.Method m = ???     // would be a reference to the foo() method
         void foo(int i) {
              java.lang.reflect.Method m = ???     // would be a reference to the foo(int i) method
    }Thanks in advance for any answer

    There is no such feature. I can't think of a single reason why you'd want it either.

  • HT201210 I was updating my ipad and there was an error, it now will not restore?  I cannot make head or tail of the apple help section what do I do next??

    Help, Ipad stopped working!!!!

    i do have same problem.. after update ios6.1.. tha
    cagordon59 wrote:
    Help, Ipad stopped working!!!!
    i think u need high speed internet connection. i did same problm with u .. and has been fixed

  • FTP error cannot make connection to host, ftp not working in browsers

    hi
    bear with me as im not webmaster, using dreamweaver mx and
    today i cant up load anything just keep getting ftp error occurred
    - cannont make connection to host.
    so figured to was a problem with my hosts and its all fine
    their end, ive tryed it in passive and not passive. And if i try to
    view the ftp in a browser (ie7 and firefox) not the site but
    ftp.mysite.com (im sure theres a tech name for it i dont no)
    nothing is displaying, now this is only happening on my computer
    and my isp(rang them they say its fine).
    how to i fix this is it a dreamweaver problem a browser
    problem or just some box i need to tick on my comp??
    Hope you can help, will be a life saver

    hi
    bear with me as im not webmaster, using dreamweaver mx and
    today i cant up load anything just keep getting ftp error occurred
    - cannont make connection to host.
    so figured to was a problem with my hosts and its all fine
    their end, ive tryed it in passive and not passive. And if i try to
    view the ftp in a browser (ie7 and firefox) not the site but
    ftp.mysite.com (im sure theres a tech name for it i dont no)
    nothing is displaying, now this is only happening on my computer
    and my isp(rang them they say its fine).
    how to i fix this is it a dreamweaver problem a browser
    problem or just some box i need to tick on my comp??
    Hope you can help, will be a life saver

  • Dreamweaver CS3 FTP Error: Cannot make connection to host

    I have Windows Vista with a new purchase of Adobe Dreamweaver
    CS3 Web Premium. I am a regular Dreamweaver user since version 2.
    But this FTP situation still baffles me.
    1. I have set up all my FTP parameters as usual and have
    tried to use "Passive FTP" and the "Secure FTP" settings, but to no
    avail
    2. I tried to FTP via explorer and do have access to my
    hosting service. The problem lies related to Dreamweaver itself.
    3. I tried to check to see if my Windows Firewall would
    affect it, but it is included in the firewall exception list.
    I checked the other forum listings related to this problem,
    and one of them mentions about the 60 second issue. I also checked
    my site preferences and it is set to 60.
    I don't want to use Cute FTP. I've been using Dreamweaver for
    all these years and found it annoying to get another program just
    for this. I am hoping to resolve this issue here on the forums so
    that other Dreamweaver CS3 users can use FTP to upload their
    site.

    http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_14834
    http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19012
    Maybe those will help.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "David J." <[email protected]> wrote in
    message
    news:fj5vul$mi2$[email protected]..
    >I have Windows Vista with a new purchase of Adobe
    Dreamweaver CS3 Web
    >Premium.
    > I am a regular Dreamweaver user since version 2. But
    this FTP situation
    > still
    > baffles me.
    >
    > 1. I have set up all my FTP parameters as usual and have
    tried to use
    > "Passive
    > FTP" and the "Secure FTP" settings, but to no avail
    > 2. I tried to FTP via explorer and do have access to my
    hosting service.
    > The
    > problem lies related to Dreamweaver itself.
    > 3. I tried to check to see if my Windows Firewall would
    affect it, but it
    > is
    > included in the firewall exception list.
    >
    > I checked the other forum listings related to this
    problem, and one of
    > them
    > mentions about the 60 second issue. I also checked my
    site preferences and
    > it
    > is set to 60.
    >
    > I don't want to use Cute FTP. I've been using
    Dreamweaver for all these
    > years
    > and found it annoying to get another program just for
    this. I am hoping to
    > resolve this issue here on the forums so that other
    Dreamweaver CS3 users
    > can
    > use FTP to upload their site.
    >

Maybe you are looking for

  • Can you use a network share as location for users' home

    I am running a Mac mini with Mountain Lion and Server.app as a home server. For added storage space I have a NAS. I would like to set up the open directory network users' home share on the NAS. Is that even possible? I am able to mount the network sh

  • IPad update Error- There was a problem downloading the software for the iPad .... network settings

    "iPad update Error- There was a problem downloading the software for the iPad X you do not have enough access privileges for this operation. Make sure your network settings are correct and your connection is active, or try again." is the error. The r

  • The Dock keeps returning in Quicktime full screen mode

    Hi all, hope someone has some insight as this is really starting to get to me... when watching stuff in QT every time at some point the dock will reappear on top of the movie and i will have to cmd+F out and back in to get rid of it, sometimes it com

  • White Overprint Preflight?

    Is it just me or is there not a setting in Acrobat's preflight that will alert you of white objects set to overprint? I saw white text set to overprint but not anything else. We recently had a file that had some white outlined text set to overprint a

  • Ipod cannot be synced internal device error

    This has been very aggravating for me for a while now. I've been trying to sync music on my ipod touch, but I keep getting a message that says "ipod cannot be synced internal device error". I tried to restore my touch and I even downloaded the latest