Probably a noob question.

Discussion in 'Java' started by alex345boy, Feb 3, 2020.

  1. alex345boy

    alex345boy

    Joined:
    Feb 3, 2020
    Messages:
    1
    Likes Received:
    0
    Why can't I run this program? There is no green playbutton, I am new to coding and I couldn't figure out the problem, hopefully it's not something quite obvious. Thanks in advance
    upload_2020-2-3_22-42-21.png
     

    Attached Files:

    alex345boy, Feb 3, 2020
    #1
    1. Advertisements

  2. alex345boy

    John Joe

    Joined:
    Apr 25, 2017
    Messages:
    137
    Likes Received:
    16
    Location:
    Malaysia
    You miss a static there in your main method.
    Code (Java):
    public static void main(String args[]){
         // your code
    }
     
    John Joe, Feb 4, 2020
    #2
    alex345boy likes this.
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.