Yik Yak icon
Join communities on Yik Yak Download
Help on this Java
2 upvotes, 10 comments. Yik Yak image post by Anonymous in Computer Science. "Help on this Java"
upvote 2 downvote

default user profile icon
Anonymous 4w

public static void main(String[]args)

upvote 9 downvote
default user profile icon
Anonymous 4w

Not yet

upvote 1 downvote
default user profile icon
Anonymous 4w

Also get rid of the static on every method except main. You dont need it.

upvote 1 downvote
default user profile icon
Anonymous replying to -> #1 4w

What do your imports look like for Scanner?

upvote 1 downvote
default user profile icon
Anonymous replying to -> #1 4w

I need do it again if I already have on my main

upvote 1 downvote
default user profile icon
Anonymous replying to -> OP 4w

It should be public class JavaEx1 { public static void main (String []args){ // call your methods here }}

upvote 2 downvote
default user profile icon
Anonymous replying to -> OP 4w

Make sure your file is named JavaEx1 typed exactly as it is written in your code

upvote 6 downvote
default user profile icon
Anonymous replying to -> OP 4w

https://www.geeksforgeeks.org/java/java-hello-world-program/ Have you written helloworld yet? This article is helpful for beginners.

upvote 2 downvote
default user profile icon
Anonymous replying to -> OP 4w

Java is very precise about syntax. If python was your first programming language this may be a bit of an adjustment since Java is strictly typed. You've got this and dont hesitate to dm me if you have more issues. I'm a senior and I tutor for my college.

upvote 1 downvote
default user profile icon
Anonymous replying to -> #1 4w

Yes python was my first language

upvote 1 downvote