473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

What programming should i learn first? Java or C#

Hi, i am a php programmer who has no previous programming experience neither in java nor in c#(sharp). My goal is to learn both languages java and c#, so i am looking for an experienced programmer who has in depth knowledge of both languages to suggest me which one to start first in order to make my learning process easier and to help me grasp fast on the second language once i have finished learning the first. (e.g some people find it easier when they learn the difficult language first or the one that has more features and programming aspects so once they are through and they start the second one they find the learning process like walking in the park)
Jan 14 '10 #1
12 16717
pbrockway2
151 Expert 100+
I've never used C# so I don't really meet the job description in your question... However my understanding is that the differences between Java and C# are much smaller than say between Java and C++.

A glance at the "features" list at Wikipedia suggests that C# might be the more elaborate (with memory address support and properties). But what mostly stands out is how Java-like it is.

I guess you're aware that Java is promoted as "write once run anywhere". Leaving aside the way that this characterisation has morphed from being a technical description/aim to a marketing slogan, the language is hugely portable: which can be a boon or a pain depending on what you're trying to do. Whether or not you want to run your code on a variety of platforms and on how much you need to depend on Windows specific APIs might have more bearing on your choice than language distinctions.

Perhaps you should "Hello world!" in both! For Java the place to start is Sun's Tutorial which begins with how to download the relevant software and proceeds through an extremely comprehensive survey of the language.
Jan 14 '10 #2
Frinavale
9,735 Expert Mod 8TB
Both languages are really powerful.

I started learning c/c++ and the moved to Java. I fell in love with Java when things just worked in Java that took forever to get to work in c/c++.

Java has a great framework of classes that you can use to develop some very powerful applications for many different environments (websites, web services, desktop applications, services....etc etc).

The documentation for Java is amazing.

The Java API is well documented and Java even comes with tools that help you to generate good documentation for your own API.

I couldn't get over how easy Java was to use and how nicely everything just worked (garbage collection!).

The other really nice thing about Java is that it's platform independent. This means that it can run in Windows or Linux...which is really helpful because most school projects want you to develop applications that are platform independent (trust me this is a real pain in c/c++).

Sadly, I haven't used Java in years. I sort of miss it actually and I'm thinking about trying to learn it in my spare time so that I don't completely forget everything about it.

I am a .NET developer.
C# is part of my domain :)
C# uses the .NET framework which I have to say is probably a lot more powerful than the Java framework.....

BUT...the .NET framework is only available in the Windows operating system. (Well there are things like mono to help port .NET to other operating systems but these systems are limited).

So, one question to consider would be: do you want to be a Windows developer?

The documentation and resources for the .NET framework and for C# in general is bountiful. The MSDN library is even more impressive than the Java API supplied by Sun. And there are tools (recently developed) that let you generate good documentation for your code as well.

I love .NET but Java is also awesome.


To me, it doesn't really matter which language you learn, so long as you have a concrete understanding of programming concepts...from there it's just syntax and figuring out what the framework (java/.net) offers you in the way of tools/controls/classes to make things easier for you as a developer.

-Frinny
Jan 15 '10 #3
RedSon
5,000 Expert 4TB
I started out the opposite way. I learned Java then moved to C/C++. It was very challenging and difficult at times but I liked the power it afforded me. I felt closer to the hardware and felt like I was actually doing some hacking instead of just calling a catalog of APIs. When you use a language like C/C++ it teaches you how to be precise and diligent and careful. You actually need to think about what you are going to write before you start writing. Java and C# are more forgiving. Some would say, allows you to be more sloppy.

Java is backed by Sun while C# is backed my Microsoft. Microsoft has made sure that C# is their principal language (however that may be superseded by F#, not sure on that yet). Java works on almost all platforms using the JDK/JRE from Sun. C# works on Microsoft platforms, with some support in the opensource community for the parts of the .net Framework that have been reverse engineered.

Both Java and C# enjoy large user bases, can be used for both application and web development. Both have unit testing frameworks, both have tools to help you document your code.

A Java SDK is free, a C# SDK comes with Visual Studio. Visual Studio costs money, unless you are happy with an express version.

You can develop Java on most any platform. You need to develop C# on a Windows machine.

Java is supported on most mobile devices. It is also an integral part of Android. C# is only supported on Windows Mobile smart phones.

C# allows you to access (powerful) lower level system calls using things like p\invoke, I don't think Java lets you do that.

Bytecode can be reverse engineered easier than MSIL. C# also comes with an obfuscation utility to make your code even harder to reverse engineer.

If you learn Java you will already have a good idea about C#. The other way around is true as well.

C# is supported by XBOX with XNA. Java has a java games library but can't be used on any console.

Hmm... what else? Well, I can't really think of more off the top of my head. I'll update this when more things occur to me.
Jan 15 '10 #4
Frinavale
9,735 Expert Mod 8TB
Visual Studio Express is a free version of visual studio
Jan 15 '10 #5
RedSon
5,000 Expert 4TB
@frinavale
a java sdk is free, a c# sdk comes with visual studio. Visual studio costs money, unless you are happy with an express version.
q. e. d.
Jan 15 '10 #6
HINT * HINT ---- Study them both at the same time!
Nov 17 '10 #7
I'm a .NET developer (C#). And I like it allot! I did planned to learn Java, but it took way to long to just put a website online in Java because I didn't know how and what. When doing this in Visual Studio, its done in no time and you can start programming :D C# is also strongly typed so i'm happy with my choose.

-Bryan
Nov 18 '10 #8
nathj
938 Expert 512MB
I taught myself PHP and found that very easy. I tried to learn C at Uni and found it difficult, C++ was ok though. Then more recently I went on the SCJP course and found Java easy to pick up in that very intensive way.

The main strength of Java is the fact that it runs in a JVM - the JCM is available for any platform so Java is very useful. In terms of learning the language I recommend getting on a course - if this is a career move something like SCJP would be worth doing. From that base of a solid foundation it's a case of building an app and using the forums. the big thing to remember is the prevalence of libraries that exist to handle all sorts of things. A lot of apps now are collection of libraries with custom wrapper code t make them all hang together.

So, my suggestion would be head over to Java first. But whatever you decide an intensive training course is going to be a good investment
Nov 18 '10 #9
Joseph Martell
198 Expert 128KB
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:

Expand|Select|Wrap|Line Numbers
  1. Dim myString as String = String.Empty
and C# would declare a string as:

Expand|Select|Wrap|Line Numbers
  1. 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.
Nov 19 '10 #10
i think java and c# both are great languages with different aspect in their different fields.
Jul 23 '12 #11
lyodmichael
75 64KB
i started learning c/c++/php in school, and now i just read some article about c# and java, but start what ever you want :).

the brain is no limit of thoughts.

#tip
Jul 23 '12 #12
Languages ​​like Java and C#(from syntaxs). But Java's slogan is "Write once, run everywhere". Java is not dependent a platform. Therefore I would suggest Java.
Jul 25 '12 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Dave D | last post by:
What's the Big Java Development Environment These Days? I used to use VisualCafe years ago.... -- Dave
17
by: Jared | last post by:
This is going to seem like a generic question that has been posed 1001 times and is probably very subjective, but I need some real world answers, rather than textbook answers. Let me give my...
40
by: dydx13 | last post by:
Hello, I'm currently attending a university majoring in Computer Science. I took C and C++ at a community college and got an A in both classes. That was three years ago. I have not programmed or...
3
by: dydx13 | last post by:
Which programming language should I learn first: C or C++? Thanks! -- --------------------------------- --- -- - Posted with NewsLeecher v3.7 Final Web @ http://www.newsleecher.com/?usenet...
8
by: LayneMitch via WebmasterKB.com | last post by:
Hello. I've already learned HTML/CSS...I'm completing the learning process for Javascript and the next language is going to be Actionscript. Now, I've been reading the opinions about different...
1
by: LayneMitch via WebmasterKB.com | last post by:
Hello. I've already learned HTML/CSS...I'm completing the learning process for Javascript and the next language is going to be Actionscript. Now, I've been reading the opinions about different...
1
by: stirredo | last post by:
I have just "finished" learning C. By finished, I mean I have learned all the basics in plain vanilla C (command prompt style). I want to get into windows developement so that i can create...
6
by: Giku Promitt | last post by:
We received a task @ school to create a project for our winter session. My task is to make a program that would automize the ticket booking process in a cinema. Assuming that: I want a friendly...
3
by: haanjae | last post by:
what programming language should i use in creating a bandwidth control system? Java, C++, C# or any other language?
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.