.
@wio @Kainui
``` public class Test { public static void main(String[] args) { System.out.print("Test"); } } ```
Copy and paste that. Then try to run it.
Create a Java project, make a new class and name it something, anything, whatever. Test would be a good name, like wio did. To make code blocks like wio did, just use this ` which is at the top left on your keyboard, same as this ~
Make a new question with a project Euler question. I'll walk you through it as an example.
Did it compile and run?
I went run but nothing happened
show us a screenshot of what you're looking at right now.
Actually I'll leave wio to this, give him your medals he's the expert here not me. I'm going to be back in 30 minutes.
That's good! At the bottom there you had it say "Test". Add this to your code ``` System.out.println("Hey what's up dude?");
oooh
nice lol
Yeah, the hard part right now is figuring out what is stuff that is made up by us and what is part of "Java". Try to break/play with code you don't understand to figure it out, this is your first programming advice. Ok I'll be back in 30 minutes have fun.
Can we make it do a math problem? like 1+1 = ? haha
This is a bit more advanced: ``` import java.util.Scanner; public class IOTest { public static void main(String[] args) { Scanner input = new Scanner( System.in ); System.out.print("Type something"); String something = input.next(); System.out.print("You typed: " + something); } } ```
Same result though, isn't it?
Can you show me what you got?
Unless you wanted me to type somewhere else as well, but this is what I got: http://puu.sh/9NC2k/cc5e3a0689.png
yeah, but type something and press enter
oooh cool haha
what did you get?
How do you put a space?
`String something = input.nextLine();`
``` System.out.println("Knock knock"); System.out.println("Who's there?"); ```
This is really cool haha, it tells you if you make an error.
Make a new question
What exactly are you guys doing? :) I'm quite fluent in Java, so if you need any further help @iambatman I would be obliged.
Join our real-time social learning platform and learn together with your friends!