View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Discussion 1 - Sashmit Bhaduri

A Comparison of Java and C#

Source (found on ACM Digital Library):
Journal of Computing Sciences
Volume 20 , Issue 3 (February 2005)

Authors
Shyamal Suhana Chandra University of Pittsburgh, Pittsburgh, PA
Kailash Chandra Pittsburg State University, Pittsburg, KS

http://gtel.gatech.edu:2111/ft_gateway.cfm?id=1040228&type=pdf&coll=portal&dl=ACM&CFID=53728780&CFTOKEN=58949747


This article was a comparison between the Java and C# programming languages.

How these languages differ:

Both are languages that have gained much attention both in academic and commercial worlds.
A lot of universities have switched from C++ to Java at beginner's levels because of the complex
nature of C++.

Identifiers and Keywords:
Java and C# have similiar rules in terms of identifiers and keywords. C# has about 25 more
keywords than Java does, mostly relating to the .NET platform. In terms of regular usage
however, they are very similiar.

Objects and Data Types:
Both Java and C# are built upon objects and instances. In Java, there are two types
of information: primitive data and objects. The only forms of primitive data are integers,
reals, and characters. All other objects are instances of classes. Access to all primitive
data is direct, while references to objects are done through references, like pointers in C++.

C# simplifies this somewhat– there are two kinds of data, value types, and reference types. Value
types are information that referes to classes, interfaces, delegates, and arrays, but not instances
of such. Reference types refer to actual instances of those value types.

Operator Overloading:
In Java one cannot overload any operators. C#, like C++, allows operator overloading of most
operators.. but not operators like =, typeof, new, etc..

Arrays:
In Java, arrays can be 1d, nd, or jagged-nd arrays. C# extends this by allowing rectangular
nd arrays.

In Java and C#, there are various kinds of dynamic arrays such as the ArrayList class that both
languages implement.

How does it affect people's programming:

C# is essentially a cleaned up version of java. It was created with about 5 years of Java
being loosed in the "wild". C# has a few nice features that were left out of java, but otherwise
most of this stuff is mostly syntaxtial suger. Both languages can be easily learned by beginneers.

Commentary:

In his discussion, Hai Pan reviewed another article that compared C# to Java. His article was interesting
because it talked more about the respective standard libraries tat each language offers. For example,
C# has more in depth hooks to Windows while java is meant to be very portable. This is one perspective
that my article did not delve into.

Links to this Page