C# or Java?

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

39 Replies - 10487 Views - Last Post: 11 January 2011 - 09:10 AM

#1 DivideByZero  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 238
  • View blog
  • Posts: 551
  • Joined: 02-December 10

C# or Java?

Posted 17 December 2010 - 11:27 AM

*
POPULAR

Hi,

I'm torn between learning Java and C# during this coming summer after my 2nd year at uni.
My main programming language is C++, but I want to have a secondary high level language that I can fall back on.
My degree used C# to introduce us to programming last year and we use it for my software design module this year, so I have a bit of experience in it. But I hear about Java being the most demanded language and that what you code can be used on any platform etc etc.

So could any dream in coders help a student out? Which language should I learn and why?
Also if you could, could you back up your posts with any books you found helpful?

Thanks in advance.

This post has been edited by DivideByZero: 17 December 2010 - 11:30 AM


Is This A Good Question/Topic? 5
  • +

Replies To: C# or Java?

#2 SarumanTheWhite  Icon User is offline

  • D.I.C Regular

Reputation: 73
  • View blog
  • Posts: 352
  • Joined: 04-November 08

Re: C# or Java?

Posted 17 December 2010 - 11:35 AM

Syntactically they're almost identical except for a few things here and there. My preference is toward Java. But you're going to have to ask yourself what platform do you primarily want to program under? .NET? Then C# is for you. If you're going to be writing programs that's going to be distributed across different systems and the like then Java is for you.
Was This Post Helpful? 3
  • +
  • -

#3 DivideByZero  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 238
  • View blog
  • Posts: 551
  • Joined: 02-December 10

Re: C# or Java?

Posted 17 December 2010 - 11:46 AM

I understand they are similar.
It's just that they both have great things going for each other, but I don't want to teach myself both as it'll mean I'll never have the time to be able to learn them both fully.
What I'm trying to say is both languages appeal to me, but I don't want to be a jack of all trades, master of fuck all :)
Was This Post Helpful? 0
  • +
  • -

#4 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10647
  • View blog
  • Posts: 39,539
  • Joined: 27-December 08

Re: C# or Java?

Posted 17 December 2010 - 01:23 PM

What do you want to do? Do you want to be a Windows developer? If so, go for C#. Do you want to develop Android apps? If so, go for Java. Also, Java EE is very common in the workplace for Enterprise-grade applications. If you don't have a preference based on the above, check out the jobs listings where you want to live. Is that town a .NET town, a Java town, etc.? Go for the language based on where you work.

Also, I'll move this to the Corner Cubicle for more discussion. :)
Was This Post Helpful? 2
  • +
  • -

#5 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: C# or Java?

Posted 17 December 2010 - 01:57 PM

Well you may want to look at it this way:

Depth first search or breadth first search?

If you go C# you already have a basic understanding of it so you will be able to dive deeper into the language and do more interesting things quickly.
IF you go Java you will gain knowledge of another language and expand you overall view of the language landscape.

Both courses have merit. I generally feel that it is bast to pick one "darling language" or "go to language" that you know well enough to solve 95% of problems you face in it. It does not matter what that language is. For me it was QBASIC for many years. The point is that programming is a skill and it takes a lot of practice to really perfect and it is easier to do that if you concentrate on one language.

Once you have learned one language to the point where you feel confident in your ability to use it to solve just about any problem you may face, well then it is good to go out and learn about different perspectives.

I would argue that all professional programmers (or at least 99.9% of them) know how to program in a handful of languages and can probably use just about any language given a day or two... so for me, depth first search seems like it would be more beneficial.

On the other hand: Being a breadth first search kind of developer would probably mean that you would be pretty good at coming up to speed on different technologies. So if you are interested in say becoming an architect then learning a little bit about a lot of different things would probably be a very good thing.
Was This Post Helpful? 3
  • +
  • -

#6 DivideByZero  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 238
  • View blog
  • Posts: 551
  • Joined: 02-December 10

Re: C# or Java?

Posted 17 December 2010 - 01:57 PM

View Postmacosxnerd101, on 17 December 2010 - 12:23 PM, said:

What do you want to do? Do you want to be a Windows developer? If so, go for C#. Do you want to develop Android apps? If so, go for Java. Also, Java EE is very common in the workplace for Enterprise-grade applications. If you don't have a preference based on the above, check out the jobs listings where you want to live. Is that town a .NET town, a Java town, etc.? Go for the language based on where you work.

Also, I'll move this to the Corner Cubicle for more discussion. :)

Well I live in the UK (London to be more specific), and I'm a student currently so I have no idea what the bias is.
It really doesn't matter to me what kind of developer I am, although I am kinda a microsoft fanboy as I own a Xbox 360 and learn XNA for one of my modules.

I don't know, both sound so appealing.
Java is the most popular but C# is the fastest growing from what I've seen.
Was This Post Helpful? 0
  • +
  • -

#7 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10647
  • View blog
  • Posts: 39,539
  • Joined: 27-December 08

Re: C# or Java?

Posted 17 December 2010 - 02:00 PM

If you don't know the bias, then search some job listings. :)
Was This Post Helpful? 1
  • +
  • -

#8 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2874
  • View blog
  • Posts: 11,047
  • Joined: 15-July 08

Re: C# or Java?

Posted 17 December 2010 - 02:03 PM

If you like .NET and feel that it's ok to leave some people unable to use your programs, then C# is certainly the way to go. I'm a Java guy, but I find C# to be more elegant (since it learned from Java's mistake). Based on the fact that you are a Microsoft fanboy, own a 360, and are learning XNA in school, I would stay with C# and learn it well before moving on to other languages.
Was This Post Helpful? 1
  • +
  • -

#9 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6075
  • View blog
  • Posts: 23,541
  • Joined: 23-August 08

Re: C# or Java?

Posted 17 December 2010 - 02:07 PM

If your target OS is Windows, C#; other/cross-platform, Java. Mono project notwithstanding.
Was This Post Helpful? 1
  • +
  • -

#10 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2537
  • View blog
  • Posts: 4,638
  • Joined: 24-September 10

Re: C# or Java?

Posted 17 December 2010 - 02:18 PM

you said you don't want to learn both because it will keep you from learning one or the other fully.

Well I say you're naive in thinking that (you are only second year student), and it really isn't true. It just will take more time.


In that case though, I'd say go Java. You've already dabbled in C#, so it's time for you to pick up a 3rd language for once. In the field of these high level languages, most of the workscape demands an ability to jump from language to language nimbly. So playing in Java now will help you explore other languages instead of going to stuff you've already seen.

As NickDMax said:

Quote

If you go C# you already have a basic understanding of it so you will be able to dive deeper into the language and do more interesting things quickly.
IF you go Java you will gain knowledge of another language and expand you overall view of the language landscape.



In a few months of you writing Java, I bet you'll be rethinking that whole statement of yours where you don't want to learn to many languages. And instead will come back to C# to utilize those things you learned from Java.



To give you an example of what I mean about being nimble. I took an interview for a job, they asked me to write some code using a language I had never used before in my life (VB.Net, I never wrote it because I held that pompous opinion that VB was garbage). I reviewed MSDN for 5 minutes to gather the syntax, expressed my general knowledge from C# and Java, and I was done with the 'test' they gave me 20 minutes later.

It's that very ability to be nimble that scored me a job.
Was This Post Helpful? 4
  • +
  • -

#11 Zekorov  Icon User is offline

  • D.I.C Head

Reputation: 22
  • View blog
  • Posts: 226
  • Joined: 16-May 10

Re: C# or Java?

Posted 17 December 2010 - 02:33 PM

I actually agree with lordofduct there. This can easily be compared to the argument of bilingual children in the education system. Those kids that started out using one language and then learned another spoken language actually are benefited more by learning two languages rather than the one because from there they can more easily see contrasts in grammar, vocabulary, and other tools of speech and therefore, learn other languages much faster and easier. And another point from this analogy that can be taken into account is that people that do learn multiple languages at the same time end up benefiting later from it because as previously stated, they can expand more rapidly and still gain full understanding of several languages. Whereas people that learn one language early in life have a much harder time learning a second because they can't possibly know the similarities of two or more languages as they never spoke two or more languages. In addition, as a baby, when you learn multiple languages, they tend to stick with you much more easily and you can speak all of them fluently by the time you're grown. Think of yourself as an infant in programming, only two years old, just learning to speak and then i think you'll understand fully what i'm saying.
Was This Post Helpful? 2
  • +
  • -

#12 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2874
  • View blog
  • Posts: 11,047
  • Joined: 15-July 08

Re: C# or Java?

Posted 17 December 2010 - 02:45 PM

Great point Zekorov! You should see me trying to get through Spanish. It's the same with programming languages. Though I settled on Java, PHP, and Python, I started with C++ and then moved to C#, and then found my way around.
Was This Post Helpful? 1
  • +
  • -

#13 Zekorov  Icon User is offline

  • D.I.C Head

Reputation: 22
  • View blog
  • Posts: 226
  • Joined: 16-May 10

Re: C# or Java?

Posted 17 December 2010 - 02:50 PM

Well thanks Dogstopper, and that sounds pretty cool with the programming languages. I have started in Java and am trying to learn VB6 and C++. but i haven't even been programming for a year yet.... so i'm like a new-born baby programmer. haha
p.s. Good luck with Spanish. I actually took German and started learning Russian on my own. I can barely speak any German anymore though. and Russian, the most recent of which i undertook to learn, is quite difficult because of the completely different character system it has. :P

This post has been edited by Zekorov: 17 December 2010 - 02:52 PM

Was This Post Helpful? 0
  • +
  • -

#14 DivideByZero  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 238
  • View blog
  • Posts: 551
  • Joined: 02-December 10

Re: C# or Java?

Posted 17 December 2010 - 02:55 PM

View PostZekorov, on 17 December 2010 - 01:50 PM, said:

Well thanks Dogstopper, and that sounds pretty cool with the programming languages. I have started in Java and am trying to learn VB6 and C++. but i haven't even been programming for a year yet.... so i'm like a new-born baby programmer. haha
p.s. Good luck with Spanish. I actually took German and started learning Russian on my own. I can barely speak any German anymore though. and Russian, the most recent of which i undertook to learn, is quite difficult because of the completely different character system it has. :P

When do you decide to move onto another language?
A year with one language isn't a lot.
I heard a saying that you can only consider yourself decent at a language until you've been using it for atleast 3 years.
Was This Post Helpful? 0
  • +
  • -

#15 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2874
  • View blog
  • Posts: 11,047
  • Joined: 15-July 08

Re: C# or Java?

Posted 17 December 2010 - 03:00 PM

I've done Java for 2 years now. I spent my first year drifting between online tutorials trying to understand the concepts of programming (I was 12). Then I spent a year learning web and programming console-based things in C++ to figure out how things...work. It was in the summer of my freshman year that I found Java and shortly after, I found Python. When I was asked to take a consulting job, it required PHP, so I learned/still learning that. It has been a total of about 4.5 years now with me, and I still have a long way to go.
Was This Post Helpful? 1
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3