J2SE 1.5 (Java) vs .Net 2.0 (C#)

B

babylon

i just read this
(http://java.sun.com/developer/technicalArticles/releases/j2se15/)
am I correcting on these concepts?
Java Metadata == C# Attribute (java learn from c#?)
Java Generics == C# Generics (any other difference?i heard that C#'s generic
is faster)
Java autoboxing == C# autoboxing (java learn from c#?)
java enchanced for == C# foreach ( (java learn from c#?)
java enumerated type == c# enum (java learn from c#?)
java static import == c# ???
java formatted input output == C# console.Write?
java varargs == C# params.....(java learn from c#?)
java concurrent utilities == c# ?

i originally pick C# for it's performance
with java's SWT and all the new features from 1.5, it seem that java is
getting better with the advantage of better cross plaform ability.

would c# be ever has the same cross plaform ability as java?
I'm in the middle of picking which language/framework to choose for my
project...
thx.
 
J

Jon Skeet [C# MVP]

babylon said:
i just read this
(http://java.sun.com/developer/technicalArticles/releases/j2se15/)
am I correcting on these concepts?
Java Metadata == C# Attribute (java learn from c#?)
Java Generics == C# Generics (any other difference?i heard that C#'s generic
is faster)
Java autoboxing == C# autoboxing (java learn from c#?)
java enchanced for == C# foreach ( (java learn from c#?)
java enumerated type == c# enum (java learn from c#?)
java static import == c# ???
java formatted input output == C# console.Write?
java varargs == C# params.....(java learn from c#?)
java concurrent utilities == c# ?

You're right that those features are going to be available. However,
they've been under development for a very long time - it's not a case
of "learning from C#" although I dare say that C#'s presence has made
the need for those features more keenly felt.

The .NET generics are certainly better than the Java ones as I
understand it, too.
i originally pick C# for it's performance
with java's SWT and all the new features from 1.5, it seem that java is
getting better with the advantage of better cross plaform ability.

would c# be ever has the same cross plaform ability as java?
I'm in the middle of picking which language/framework to choose for my
project...

C# in itself is cross-platform, and indeed you can get a CLR for other
operating systems (see http://www.go-mono.com) but you won't get all
the same libraries (things like System.Windows.Forms can be emulated to
some extent, but it's unlikely to ever be *really* compatible).
 
P

Philip Rieck

To add to what Jon has said:

Also, the actual language features aren't what makes .net so much more
productive for me (I used to use Java)... it's the .net framework class
libraries and all that they contain, the ease of P/Invoke, and the design
and features of the CLR -- not to mention the excellent IDE and toolset
support.

You have to weigh a lot of factors when choosing the development platform
and toolset -- and in my mind wether the language has enums or not is not
that high on that list.

Just my opinion
-Philip
 
?

=?ISO-8859-1?Q?Mike_Kr=FCger?=

Hi

Easy: If you need platform independence go with Java.
Else stick with C#.

Even if I must admit that Java 1.5 with the new features and the fast
SWT (It's even faster than Windows.Forms on my machine :)) is nice. The
main reason for choosing a platform is personal preference and
what do you think what you get as answer in a .NET newsgroup if you ask
a question of platform choice?
(And you may imagine the answer you'll get to the same question in a
java newsgroup.)

Regards
Mike
 
D

Daniel O'Connell [C# MVP]

Action said:
.Net is support to be platform independent....
Technically it is, practically it isn't currently. System.Windows.Forms
won't port well, some other code relys on Windows specific stuff and the
implementation we work with is not aimed at platform independence, its a
Microsoft platform. Mono is a possible alternative but I doubt it'll ever be
fully up to speed(even now it has a long way to go, the compiler is far from
perfect).

Anyway, .NET and Java are platforms, the OS they run on its largely
irrelevent in a perfect world(usually always relevent in the real world).
However, they are platforms onto themselves.
 
D

Daniel O'Connell [C# MVP]

Mike Krüger said:
Hi

Easy: If you need platform independence go with Java.
Else stick with C#.

Even if I must admit that Java 1.5 with the new features and the fast
SWT (It's even faster than Windows.Forms on my machine :)) is nice. The
main reason for choosing a platform is personal preference and
what do you think what you get as answer in a .NET newsgroup if you ask
a question of platform choice?
(And you may imagine the answer you'll get to the same question in a
java newsgroup.)

I'm still having trouble with SWT. There is just somethign about that
architecture that bugs me, I can never get it right. Thats probably one of
the reasons I've never been too gung0ho with java.
 
J

Jon Skeet [C# MVP]

Daniel O'Connell said:
I'm still having trouble with SWT. There is just somethign about that
architecture that bugs me, I can never get it right. Thats probably one of
the reasons I've never been too gung0ho with java.

I haven't used it myself (outside modifying Eclipse - isn't having an
open source IDE great?) but others who've used it seem to like it, and
if Eclipse is anything to go by it can certainly be used to create
lovely UIs.
 
D

Daniel O'Connell [C# MVP]

Jon Skeet said:
I haven't used it myself (outside modifying Eclipse - isn't having an
open source IDE great?) but others who've used it seem to like it, and
if Eclipse is anything to go by it can certainly be used to create
lovely UIs.
I have heard many good things about it(except some parts of the look, as a
whole I'm not a fan of a few things, like checkboxes, even with some of the
nicer L&F's). I just can't seem to find a good tutorial, the lack of
properties and a general unease with java keeps me from groking it right off
the bat. I'll probably get around to it eventually.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top