Term Paper Undergraduate 737 words Human Written

Comparing and Contrasting Java With C. Net

Last reviewed: ~4 min read Taxes › Comparative
80% visible
Read full paper →
Paper Overview

¶ … C# and Java have more similarities than differences, Java programmers my shun C# is situations where they require high-quality program design, cross-platform portability and runtime extensibility for remote applications. Developers that require a more expressive language than Java are likely to appreciate Microsoft's many expressive...

Writing Guide
How to Write a Literature Review with Examples

Writing a literature review is a necessary and important step in academic research. You’ll likely write a lit review for your Master’s Thesis and most definitely for your Doctoral Dissertation. It’s something that lets you show your knowledge of the topic. It’s also a way...

Related Writing Guide

Read full writing guide

Related Writing Guides

Read Full Writing Guide

Full Paper Example 737 words · 80% shown · Sign up to read all

¶ … C# and Java have more similarities than differences, Java programmers my shun C# is situations where they require high-quality program design, cross-platform portability and runtime extensibility for remote applications. Developers that require a more expressive language than Java are likely to appreciate Microsoft's many expressive features such as metadata availability, event handling, and property access. The most serious deficiency of C# is the lack of exception handling, meaning that the compiler will not notify the programmer if an exception occurs.

Java, on the other hand, allows exception checking and the compiler will generate a compile-time error if the programmer hasn't specified how to handle the exception. The lack of checked exceptions in C# may lead to program designs which are flawed. C# developers must tale extra care to document all exceptions that callers should be aware of. Java applications are portable across a number of operating systems and platforms.

Sun supports Linux, Windows and Solaris and other vendors have implemented Java on a range of platforms such as OS/2, AIX and MacOS. Similar Java versions provide binary compatibility across platforms. In contrast, C# cross platform depends on the OSS community to write cross platform libraries for C#. Here, Microsoft is focusing on cross-language development rather than cross-platform development for its.NET strategy and provides unmatched native support for its own operating system.

Dynamic class loading allows Java applications to download the class files of classes that do not exist on the target machine. Thus, an object type that only exists on one machine can be transferred to other machines in a seamless and transparent manner. This means that new types can be introduced on a remote machine which allows the behavior of remote applications to be extended at runtime. Custom attributes provide a way to add metadata to a module, class, method, parameter or member variable.

Attributes provide a powerful way to extend the capabilities of C# and.NET by using them to request the runtime to perform additional task, provide information about an item or extend the abilities of a type. It is possible to access the attributes of a module, class, method or field via reflection. This is useful to determine if a class supports certain behavior at runtime or for extracting metadata about a class for use by others. Delegates are Microsoft's way to facilitate callback functions.

Delegates are akin to function pointers in C. And are often used to pass operations to a generic algorithm based on the types being used in the algorithm. Another common use of delegates is to register handlers for a particular event (i.e. The publish-subscribe model). To get the same functionality as C# delegates in Java, one must use the Java-Beans event model and adapter classes. Therefore, event handling in C# is easier and only requires the developer to implement individual methods instead of entire interfaces.

C# properties are a way to abstract away from directly accessing the members of a class, similar to how accessors and modifiers are used in Java. However, C# properties are directly supported by the language instead of relying on reflection as in JavaBeans. AC# property is accessed by users of a class as if it was a field or member variable but in actuality is a method call.

The advantages of C# properties is that the getter/setter methods are located in the same block of code and have a more intuitive syntax because properties are accessed like normal fields/member variables. In addition, there are dozens of features that give C# and edge over Java.

148 words remaining — Conclusions

You're 80% through this paper

The remaining sections cover Conclusions. Subscribe for $1 to unlock the full paper, plus 130,000+ paper examples and the PaperDue AI writing assistant — all included.

$1 full access trial
130,000+ paper examples AI writing assistant included Citation generator Cancel anytime
Sources Used in This Paper
source cited in this paper
7 sources cited in this paper
Sign up to view the full reference list — includes live links and archived copies where available.
Cite This Paper
"Comparing And Contrasting Java With C Net" (2003, February 19) Retrieved April 22, 2026, from
https://www.paperdue.com/essay/comparing-and-contrasting-java-with-c-net-144429

Always verify citation format against your institution's current style guide.

80% of this paper shown 148 words remaining