Download presentation
Presentation is loading. Please wait.
Published byBeryl Lee Modified over 9 years ago
1
.Net vs. Java And why.Net is better
2
Hello World in Java
3
Hello World in C#
4
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
5
GUI Development in Java
6
GUI Development in C#
7
For Each Loops Java: Thing[] foo; for(Thing bar : foo){… C# Thing[] foo; foreach(Thing bar in foo){…
8
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
9
Events Java has anonymous classes galore.Net has delegates (type safe function pointers)
10
Other differences Attributes are cool.Net has more flexibility to do dirty things (overloading operators, hiding base methods, etc.)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.