Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Jack Cronin
623 PointsI am finding Java hard to undertand.
I was wondering if it was just me or if I am finding Java hard to undertand. I ave been trying to undertand it for a week now and it is getting frustrating when I dont know how to even start a line or do any part of it and it kind of feels like I have wasted a week of learning this. Is it just something that I have to stick at until I know it or should I be at the satge already that I should be able to code a small project?
Joshua Roberson
4,472 PointsI would agree that there is a small spin up period to just adjusting to the environment that Java brings with it.
Having an IDE to edit in will save you enormous amounts of time - I highly recommend IntelliJ by JetBrains. This is mainly because it will handle the operations of maintaining a JVM container. Think of this as the world your code lives in.
Once you've created a project in IntelliJ.. you only need one snippet to get you going :
public static void main(String[] args) {
// your logic goes here
}
For example:
public static void main(String[] args) {
System.out.println("Enter your username: ");
Scanner scanner = new Scanner(System.in);
String username = scanner.nextLine();
System.out.println("Your username is " + username ".");
}
The output when you run the program:
Enter your username: Your username is <whateverYouTyped>.
Once you have a grasp of general Object Oriented Programming - the other languages just become a matter of understanding syntax.
Stick with it, I highly suggest you research the "Four Pillars of OOP" and SOLID concepts. Keeping your code clean & DRY (Don't Repeat Yourself) is key.
2 Answers
Steve Hunter
57,712 PointsJack!
You're not alone. Many find languages hard to start with - that's totally normal. I know I found it hard at first.
Java is a language that is "well structured". It has its requirements that are overly wordy at times. Suggestions of learning Ruby or Python first may avoid these quirks but you will find others. I love Java - it is a great language. My advice, for what it is worth, is to stick at it and ask questions in here. We can get you through and explain the concepts. The concepts are totally transferable to all other languages.
Keep at it; ask questions in the forum (Community) and if you get nowhere ask me with an @ mention - I will try my best. I am no expert but there are plenty of those here in this Community.
OK?
Steve.
Dragos Ionita
6,980 PointsI agree. When I started learning programming I started with C++ and it was weird and I felt like I had no idea what i was doing, but somehow things worked still. I was super excited to do it though, and so with time I learned it to the point where I'm comfortable with it. Only later on did I find out C++ is kinda brutal, and even professional developers complain about it. Keep at it! As long as you can enjoy it, it will pay off in the end.
Joshua Roberson
4,472 PointsDragos Ionita kudos to you.. starting with C++. I've no desire to get on that train..
Miguel Cabezas
3,063 PointsMiguel Cabezas
3,063 Pointswhy don't you try ruby or python first? they are in my opinion easier than Java. is very important that you learn the foundation of programming first, Variables, Arrays etc.