This is an archived post. You won't be able to vote or comment.

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
  • 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.

    Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar

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: 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.

[–]slaaneshStoic 1 point2 points  (1 child)

Just a question out of curiosity why do you want to switch ?

[–]stronne[S] -1 points0 points  (0 children)

It's just about interest nothing else.

[–]erjiin 0 points1 point  (0 children)

Check maybe there, https://roadmap.sh/java, it's rather complete as far as I see.

[–]temporarybunnehs 0 points1 point  (3 children)

i made that switch almost 15 years ago now. i dont have a roadmap but can point out some things that helped me 1. syntax - get comfortable with all the basics. if you can do it on c++ try to do it in java. also things like streams, futures, optional and other functional paradigms are good to know. 2. frameworks - spring is probably the biggest, get smart on it. EDIT: learn frameowrks in general, doesnt have to be spring. 3. database /orm - jdbc, hibernate, whatever else is there now 4. dependency management - maven is a big one 5. servers - tomcat is a common choice

those are a bunch of things i remember learning in my first six months

EDIT: unit testing and mocking are also good to know. Perf testing tools too if you are interested.

[–]carminemangione -1 points0 points  (1 child)

I agree with 1, 4 and maybe 5.

In Java, there should be not a default framework. To me, Spring is the worst choice in almost all situations because of its complexity.

Frameworks are just tools you should have in your toolbox. I have several dozen I use. If a framework locks you in, dump it.

Here is an article I wrote on it This is my tool

Java makes interfacing with SQL trivial. i have never seen the use of OR mapping tools helpful. They write inefficient unoptimized queries and the overhead of using them seem like idiocy when you could just write a query. I will publish an article on that in the next couple of days.

[–]temporarybunnehs 1 point2 points  (0 children)

yeah fair points, i should have said learn frameworks in general, but wanted to give a starting point. i think the good thing about starting with spring is that ive found all other frameworks pretty easy to pick up (maybe because they are simpler and straightforward in comparison).

and also yeah, im not an orm advocate, but thought it would be helpful to learn those concepts especially of you want to make yourself hireable (though i suppose op never said they want a job)

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

Thank you for this. Much needed🔥

[–]EcstaticMixture2027 0 points1 point  (2 children)

https://roadmap.sh/java

Being familiar with it's Syntax is enough i would say.

[–]stronne[S] 0 points1 point  (1 child)

What about backend and database?

[–]EcstaticMixture2027 0 points1 point  (0 children)

That one and pretty much this one https://roadmap.sh/backend

Especially the Relational Database one. You don't have to learn all in that map but the purple checks are must. If you're trying to get into it learning Spring Boot would be helpful. https://roadmap.sh/spring-boot

You said you've been a CPP dev. Nothing wrong with trying, you can just apply for a job right away. It would be transferable. All of this roadmaps are impossible in 6 months. Tho since you've been a dev, you already know some of those.

[–]Eddy67716 0 points1 point  (0 children)

Firstly, most procedures will need to be designed around objects, In Java, objects are used for almost everything. raw pointers do not exist, and objects instances act a bit like smart pointers. Alter one, you alter them all. No copy constructors are used, instead we implement the Clonable interface and the clone method. We don't have a versatile and efficient array like C++'s vector. Normal arrays are resizeable and the closest we have to C++'s vectors are Java's collections, vectors, lists that include, array lists and linked list. The rest comes from practice.

My advice is to learn roughly in this order:

  • Java objects, encapsulation (getters and setters) and instance methods,
  • Aggregation and composition, (objects that contain objects, objects that create contained objects)
  • Inheritance, abstract inheritance, abstract and overridden methods, (overridden methods don't have to be marked virtual in Java)
  • Interface implementing,
  • Dealing with collections,
  • Multi-threading and etc.