Net Vs Java
Net Vs Java
Java
And why .Net is better
Hello World in Java
Hello World in C#
Both platforms have rich class libraries
If you think it’s common, it’s probably in
been done for you.
.Net has fewer collections
◦ .Net List<T> == Java ArrayList<T> ==
Vector<T>
◦ Dictionaries are awesome, abuse them
whenever you can
Class Libraries
GUI Development in Java
GUI Development in C#
Java:
Thing[] foo;
for(Thing bar : foo){…
C#
Thing[] foo;
foreach(Thing bar in foo){…
Properties
Java has anonymous classes galore
.Net has delegates (type safe function
pointers)
Events
Attributesare cool
.Net has more flexibility to do dirty things
(overloading operators, hiding base
methods, etc.)
Other differences