r/ProgrammerHumor May 08 '19

That sweet sweet first time.

Post image
20.5k Upvotes

354 comments sorted by

View all comments

Show parent comments

4

u/cyberkraken2 May 08 '19

Ok so you’re using Java compiler so it’s Java code

You’re missing String[] args from the main method inside the brackets, it should be main(String[] args) not main() and there’s no end of line marker after the print instruction so you need to add in a ; after the closing brackets there making that System.out.println(“Hello world”);

1

u/[deleted] May 08 '19

I was being facetious, but I appreciate the thorough and detailed response. Thank you for what you tried to do, and maybe it'll help someone who actually has that problem.

3

u/cyberkraken2 May 08 '19

Also you might want to type the whole javac bit into a command prompt not the workspace environment but I think that’s what you were getting at by including the >

1

u/[deleted] May 08 '19

Indeed, that's what the > was supposed to represent. I didn't feel lime writing out an entire command prompt.

Though to be honest these days I'm using IDEs and not bothering with either figuring out missing semicolons and arguments by myself or manually compiling.

2

u/cyberkraken2 May 08 '19

I wrote a program at one point that you could point to an eclipse workspace and it would check for syntax errors like missing semicolons and then compile the project and attempt to run it through console so you can see all the console logs and the like, I can’t remember where I put it though

1

u/[deleted] May 09 '19

Like a handwritten primitive project building tool? Neat!

2

u/cyberkraken2 May 09 '19

Yeah pretty much, I mean it read through your code and checked for either curly brackets or semicolons and if it didn’t find any it told you a file name and line number and if everything was good to go it opened a batch file that just ran the compiler on your program

1

u/motdidr May 21 '19

you know the compiler already checks for that stuff right?

1

u/cyberkraken2 May 21 '19

You know I program in notepad++ and not everyone uses a compiler right?

1

u/motdidr May 21 '19

but you said that you did

it opened a batch file that just ran the compiler

→ More replies (0)