12 Replies
⌛ This post has been reserved for your question.
Hey @Juan! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
@Juan Java runs the method called
public static void main(String[] args) when you run your program, so you need to call your take() method from in there, otherwise it won't be called.
however, right now you have your take method set up to take a String[] called args as input which you are then not using, so you should remove that. I suspect you just copied it from the main method, which I understand, but it's not needed and will throw an error if you try to run it.
your code has other problems as well but at least doing that will allow your code to run. once you get it working I can suggest some ways for you to improve you code that you can then try working on if you want?💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.he has a main method
just needs to use it to call the take method
has to be called main i believe. essentially intelij does not see it as you wanting to run it. for intelij it probably looks like a normal method that takes arguments.
make it so you call it from move original main somewhere else or sth. alternatively make a new class and put it there. that way you dont have the duplicate method name error
welp didnt see below messages
but post wasnt closed ig
You made a method but it dont run the method
To call the method add to line 13:
take(args);
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.I did manage to run the code, now is working well. Thanks for the advises
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
you're welcome! glad you got it fixed
I manage to get it right, thanks bro
thanks for the help bud
After some try and error I got it right, you helped a lot.
Post Closed
This post has been closed by <@1383227897346658324>.
