First, let me say that I am not a Java developer, but I do work with 4-5 languages professionally.
This is a tough question. In short, I agree with Frinny.
Choose whichever language you want to. They both have their advantages and drawbacks so unless you have a specific application goal, you wont wind up ahead with one language vs the other.
When people start learning to program, they tend to be syntax-centric. They think that to be a good programmer they should be able to program in a language all day long without looking anything up and that they should know the language completely to the tiniest detail.
I think that concepts are far more important in practice. For example, Java and C# are both reference type languages that are built around a central library. Learning either language thoroughly teaches you inheritance, interfaces, composition, scope and visibility, what a reference is, garbage collection, object lifetime, and many, many other things.
These concepts, among others, are the underpinnings of both Java and C#. The languages handle them differently in some cases, and not-so-differently in others, but the concepts are always there.
The languages are just a means to an end after all. For example, does it really matter that VB .Net declares variables like this:
- Dim myString as String = String.Empty
and C# would declare a string as:
- string myString = String.Empty;
I would argue that being able to pull these two syntactically correct statements out of the air is
not what makes a developer a
good developer. I would argue that what makes a good developer is knowing that they just created a reference type variable that is initialized as soon as it comes into scope. A good developer should know that they have mitigated the risk of null reference exceptions to some degree by initializing these variables, but they are also conscious of the fact that null references have a place in good code.
The good developer is not the developer who avoids the help file and never needs to look up syntax rules. The good developer is not the developer who can talk to me all day long about Java syntax. The good developer is the developer that is conscious of what they are directing the computer to do and what concepts they are exercising. The good developer uses a language to achieve their goal.
So learn whichever language strikes your fancy. Have fun! Develop applications and write code until your fingers are numb from typing! Just remember to pay attention to the concept of what you are doing, not just the syntax. In the end it is the conceptual knowledge that will serve you best.