.Net vs. Java And why.Net is better
Hello World in Java
Hello World in C#
Class Libraries 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 == Java ArrayList == Vector ◦Dictionaries are awesome, abuse them whenever you can
GUI Development in Java
GUI Development in C#
For Each Loops Java: Thing[] foo; for(Thing bar : foo){… C# Thing[] foo; foreach(Thing bar in foo){…
Properties Given int myThing; Java has getters and setters (getThing(), setThing()) ◦Used like methods, because they are.Net has properties ◦Used like variables, but still encapsulated
Events Java has anonymous classes galore.Net has delegates (type safe function pointers)
Other differences Attributes are cool.Net has more flexibility to do dirty things (overloading operators, hiding base methods, etc.)