Presentation is loading. Please wait.

Presentation is loading. Please wait.

.Net vs. Java And why.Net is better. Hello World in Java.

Similar presentations


Presentation on theme: ".Net vs. Java And why.Net is better. Hello World in Java."— Presentation transcript:

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.)


Download ppt ".Net vs. Java And why.Net is better. Hello World in Java."

Similar presentations


Ads by Google