0% found this document useful (0 votes)
41 views10 pages

Net Vs Java

Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views10 pages

Net Vs Java

Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 10

.Net vs.

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){…

For Each Loops


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

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy