Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it worth learning Java when you already know C# fairly well?

Tags:

java

c#

Since C# is in many ways a direct derivative of Java I wondered whether there was any advantage to learning Java after the fact of having learnt quite a reasonable about about C#?

Note: Please provide clear, direct advice rather than discussion in order to keep in line with SO guidelines.

like image 458
ljs Avatar asked Sep 23 '08 21:09

ljs


People also ask

Is it easy to learn Java if I know C?

Java is a simple language: Java is easy to learn and its syntax is clear and concise. It is based on C++ (so it is easier for programmers who know C++).

How long does it take to learn Java if you know C?

Experience with C means you are clear with the basics of programming but still we need to develop a concept in the object-oriented realm. If you are willing to invest 2 to 4 hours a day. Two weeks will suffice to be good with the basics of Object-Oriented programming.

Is Java more useful than C?

Java is more widely known and versatile, so it's also easier to find a Java developer than a “harder” language such as C++. Overall, C++ can be used for almost anything, but it's not always necessary to use it. Java is usually sufficient and can be much more effective for your project.

Should I start with C or Java?

Should I Learn Java or C++ first? Most programmers agree that Java is easier to learn first. Java's syntax is usually easier for new programmers to understand.


4 Answers

If you want to program in Java, learn Java. It really is that simple.

The patterns, algorithms, and design ideas aren't going to be different enough that learning the language on its own is reward enough.

However, Java runs acceptably well on vastly more platforms than does C# (though with mono that's changing) so if you want to dip your toe into platform agnostic code, you might give Java a try. You'll notice it's a bit rougher around the edges, but not like going to C++ or C.

-Adam

like image 173
Adam Davis Avatar answered Oct 19 '22 09:10

Adam Davis


The syntatical difference between the two is not large, though you get a lot of .NET specific code like [] tags that you won't find in Java. But I do find that the APIs and the development approach is quite different. The back end of each is very different from the other and in .NET some code that is efficient and works well may not be suitable for Java, and vice versa.

I've worked in both, the limitation that you're going to have to get used to if you work in Java is in the IDEs. None of the IDEs out there compare to Visual Studio for speed of development and ease of deployment. (IMO anyway).

I got a lot out of working on a few Java projects. You learn a lot of different programming techniques and methodologies. Specifically I would suggest working in J2EE, the difference will certainly give you the feel of working with a different language and technology.

like image 26
Odd Avatar answered Oct 19 '22 08:10

Odd


I'm going to go with a different answer than the rest. If you are writing applications for the Windows platform, I don't see any benefit. The reason I say that is your "job" depends on knowing that platform. I can only assume that your job depends on it, otherwise, why would you be invested into it (hope that makes sense).

My suggestion is not to STOP learning though but LEARN something else that will give you a totally different perspective. Specifically I'd suggest to learn something dynamic or functional. Maybe F# for example, or give Ruby or Python a try. I think that is a better investment in time.

My $.02.

-Keith

like image 29
Keith Elder Avatar answered Oct 19 '22 09:10

Keith Elder


I'm primarily a Java guy but have done a little C# here and there. IMO there is not enough of a difference between the two to really give a lot of benefit from a broadening your programming horizons perspective. Generally when I'm looking to learn a new language I want to find something that will force me to look at a program from a different perspective. Java's perspective is basically the same as C#. There are a few differences in how some of the high-level language features work and the APIs differ in some places, but overall Java and C# are both memory-managed, statically typed, OO languages.

like image 45
Mike Deck Avatar answered Oct 19 '22 09:10

Mike Deck