Differences
The object models are platform-independent. The differences usually refer to naming and data types. Thus, for instance, all interface names in Java start with the prefix “I”, which is not the case in .Net. Properties, data types, names and their cases follow the respective language used. Here are some examples:
|
C# |
Java |
|
SearchResult |
ISearchResult |
|
string instanceName = instance.Name; |
String instanceName = instance.getName(); |
|
bool stl = instance.SupportsTrustedLogons; |
boolean stl = instance.isSupportsTrustedLogons(); |
|
Dictionary
<
string
,
string
> dictionary =
new
Dictionary
<
string
,
string
>(); |
HashMap<String, String> map =
new
HashMap<String, String>(); |