Know basics of javascript, should i learn java to do DSA problems

As a beginner I know the javascript syntax, fundamentals and have done some few basic projects using HTML , CSS , JS , and along with that i want to learn DSA and do problems as well .

So people are saying it doesn’t matter which language you choose , but people are also telling you should learn one static programming language (C, C++,Java) to do DSA problems , it would be much better .

What i am deciding is to give time to both of them (like projects using JavaScript and Java to solve DSA questions).

Is there any problem with it like what if i stuck or get confused on switching languages between doing projects with JS and DSA with java.


i should focus on one language(i.e JS) and do both projects and DSA with it without wasting time (as earlier i told about i know syntax of javascript).

1 Like

Following. I’ve also been told to learn an Oop language like Java, C#, or C++.

1 Like

I’m still not very advanced, and i expect the most important factor will be your end goals and what you want to do as a programmer, but i found that in learning by yourself without a teacher to give assignments and stuff, learning a similar language to what you are currently learning can be a good why to review and reenforce what you’ve learned and fill in some gaps, but to try to move from javascript to java might cost you a lot of time because there are a lot of basic things that apply in java that don’t in javascript so you might find yourself starting over at the beginning to learn data types and stuff. It might be better to become more proficient with one language and learn how to build things rather than jump all over the place like i find myself doing, but i have i like being able to take a break from one thing and move to the other, then i come back fresh (i’ve been learning C, C# and C++ and the C++ can be pretty exhausting sometimes and its easy to get hard stuck)

1 Like

To learn DSA , and to do that i have to learn one static programming language like Java (as it is not compulsory) but i feel like i should learn it , before learning JS, i am familiar to some basic theoretical concepts in java .

I dont know about OOPs concept , which is an important concept , but i think i will learn this concept in Java.

I agree , it will take time , i know the syntax but i am not used to it(hands on), so it will take lot of practice to become efficient in this language , like have to reach that level where i can type code effortlessly without thinking of syntax.

True very true , i am doing DSA course where they are teaching just some basics concepts of Java before moving on to DSA . This channel teachings are very exciting and deep hence want to learn java coz i dont want to miss any of the videos of their DSA playlist, although they said they will be explaining it in pseudocode.