当前位置: 动力学知识库 > 问答 > 编程问答 >

java - Cannot make a static reference to the non-static method

问题描述:

This question already has an answer here:

  • Cannot make a static reference to the non-static method

    8 answers

网友答案:

You need to call the getUsername() method from an actual Users object. Probably what you meant to do was say Contact.getUsername().

分享给朋友:
您可能感兴趣的文章:
随机阅读: