+ 1

I don't understand how I can use the compiler of Java... The Sololearn course is so confusive...

I understand how I can do a program that prints "Hello World", I understand every single thing that I've learned, but I don't know how to put that knowledge in a program! The input lesson is very confusing too! I'm doing also the C++ course and this is a lot more understandable than this! I tried to look at some java codes but the result was the same... :/

3rd Aug 2017, 10:08 PM
Leo
Leo - avatar
5 Answers
+ 3
How to learn Java for beginner's 101: Do NOT worry about what "public static void" means. Just know you need that for the main method, and the main method is where the program starts. You will learn that later on. If anything, learn void first, then public (When learning classes), then static. Do NOT worry about taking user input until you are comftorable with the basic syntax and feel ready to start OOP. Do NOT worry about what "System.out" means. Just know you need to write that before print() or println(). Again, learn these things later on. I think all those things are mainly what confuse beginners and turn them away from Java. So, ignore them, and when the time is right you'll understand. How can you get better at writing the code? Well, practice, practice, and more practice!
4th Aug 2017, 1:01 AM
Rrestoring faith
Rrestoring faith - avatar
+ 2
import java.util.Scanner; main// Scanner x = new Scanner(System.in); String y = x.nextLine(); System.out.println(y);
3rd Aug 2017, 11:42 PM
D_Stark
D_Stark - avatar
+ 1
@Restoring faith Thanks for the help!
4th Aug 2017, 12:40 PM
Leo
Leo - avatar
+ 1
@David Stark I haven't understood this. Can I make an array of input variables that uses an another variable?
4th Aug 2017, 12:50 PM
Leo
Leo - avatar
+ 1
//im not quite sure what you mean sorry ill explain.// Import java.util.Scanner; //importing Scanner class// main //Start execution// Scanner scn = new Scanner(System.in); // scn is now an object of Scanner, (System.in) means input from keyboard String str; // You declare a String variable called str str = scn.nextLine(); //input value of string variable str from user. // you only need to create one object of scanner to use multiple times for example // String str2 = scn.nextLine(); // or int num = scn.nextInt(); //if you ran this you would have 2 string inputs and one int input// //hope that helps i have only been programming for 6-7 weeks so this is what i learned after asking lots and lots of questions at the beginning myself//
4th Aug 2017, 1:48 PM
D_Stark
D_Stark - avatar