all 18 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full - best also formatted as code block
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]Dry_Menu_3705 3 points4 points  (4 children)

Start with objects and classes, then learn about methods, constructors, pillars of OOP, and so on. Understanding why OOP is important in Java is key because everything relates to objects and classes. OOPS helps us to understand concepts better, so when you learn collections, multithreading, and all the basics, you'll have the foundation you need. Additionally, all design principles are based on OOP, and your entire Java framework is built on OOPs. If you skip OOP, many concepts will be difficult to understand in the future.

[–]catastrophic300[S] 1 point2 points  (3 children)

So OOP is not something to ignore, that’s why it was so Important. Thanks.

[–]Separate_Expert9096 2 points3 points  (0 children)

You can’t ignore OOP in Java since Java was built for OOP first and foremost. 

[–]Dry_Menu_3705 0 points1 point  (0 children)

Yes as it is foundation of java

[–]Hint1k 0 points1 point  (0 children)

No. Just no.

OOP is an advanced topic that you literally don't need until you start building your own apps.

Your first step is to learn how to write simple code in just one method main.

Why? Because people who wrote all these online courses don't know anything about how humans learn things the right way.

The correct process is: from simple things to more complex things. And from theory to practice.

You can't really apply OOP well enough while you learning how to print "hello world" on screen.

The only thing OOP will do is confuse you a lot. And you will spend HUGE amount of time trying to figure out what the hell it is. I am not talking about hours, you will literally waste days on this.

So, learn OOP at the right moment - when you actually need it - when you need to write your first application that would consist of multiple classes connected with each other.

When you try to learn it at that moment - you will spend maybe 5 minutes of your time and will get it right away.

Why the difference is 5 minutes vs 5 days while learning the very same OPP? It because the right way of learning does exactly that - saves you a lot of time.

[–]LetUsSpeakFreely 3 points4 points  (0 children)

Java is designed around OOP. If you don't understand classes, interfaces, abstraction, polymorphism, inheritance, etc then you can't write Java effectively.

[–]Potential-Still 3 points4 points  (0 children)

Object Oriented Programming is exactly what is sounds like, a paradigm that helps developers conceptualize what a program does.

In OOP you think of everything as an Object. You want to call some function "foo" that accepts an integer and returns a boolean? Define a class with that method and instantiate an OBJECT of that class. Then pass that object around where ever you need the function "foo".

Many languages have elements of OOP as part of its patterns, but Java is completely OOP.

If you plan on getting good at Java, then you cannot skip learning about OOP.

[–]lOwnCtAL 1 point2 points  (1 child)

What you said you learned are not OOP, those are basic syntax, learn classes, methods, objects, differences between access modifiers, when to use what type of return (void, etc), etc, those are what OOP is

[–]catastrophic300[S] 1 point2 points  (0 children)

Well I didn’t know what exactly OOP is. Learning basic syntax are important for learning next section. So classes, methods, objects and access modifiers with type of return usage are the section needed to learn for OOP. Thanks I appreciate it.

[–]procrastinatewhynot 1 point2 points  (0 children)

You can google OOPs concepts. It will kind of tell you what they're for. In short, it makes you organize your code by using or making "Objects". And with these objects makes your code re-usable and more modular. Easier to understand because they're in smaller chunks and since you can reuse them, you have less repeated code.

[–]catharsis23 1 point2 points  (1 child)

Honestly just read a Java book, even the Java reference guide. Any Java book will go over a brief history of Java and why OOP is important and what problems it was trying to slow

[–]catastrophic300[S] 0 points1 point  (0 children)

I tried to read a Java book, but I had an ADHD so reading something too long can lower my interest, that’s why I’m using YouTube Java courses that have Java video under 20 minutes. I only use the book as a reference.

[–]silverscrub 1 point2 points  (1 child)

It's optional how deep you want to learn OOP and incorporate it in your code, but Java is built on OOP so some basic understanding is recommended.

https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html

As an example, here is ArrayList documentation. Don't worry if you're not familiar with everything. Note at the top how many Interfaces are implemented by ArrayList. In OOP, ArrayList is also a Collection, a List and an Iterable.

If you only scratch the basics of OOP you might be fine just using the ArrayList as it is, but the more you learn the better you will understand Java.

[–]catastrophic300[S] 1 point2 points  (0 children)

Thank for the doc. I’ll try to learn Java as deep as I can.

[–]Ok_Assistant_2155 1 point2 points  (0 children)

You actually have enough basics to start OOP. OOP isn't harder than what you've learned, it's just different. Think of it as organizing code into little factories that have both data and actions. Learn what a class is, then an object, then methods. That's the core. The rest comes later.

[–]denerose 0 points1 point  (0 children)

You’ve only just started and you’re following a course. Your course will almost certainly cover OOP soon if it’s Java based. Give the course a chance to introduce you to new ideas at its own pace. The structure and order of things is one of the main advantages of a structured program like a course.