Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Comparison of C Sharp and Java
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Metadata== {| class="wikitable" style="width:80%;" |- ! style="width:40%;"| [[Metadata]] !! style="width:30%;"|Java !! style="width:30%;"|C# |- |Metadata annotations/attributes || {{yes|Interface based}}; user-defined annotations can be created<ref>{{cite web |url=http://www.25hoursaday.com/ |title=A Comparison of Microsoft's C# Programming Language to Sun Microsystems' Java Programming Language: Metadata Annotations |author=Dare Obasanjo |year=2007 |publisher=Dare Obasanjo |archive-url=https://web.archive.org/web/20120919093308/http://25hoursaday.com/ |archive-date=19 September 2012 |quote=However a key difference between C# attributes and Java annotations is that one can create meta-annotations (i.e., annotations on annotations) in Java but can not do the same in C#. Developers can create their own custom annotations by creating an annotation type that is similar to an interface except that the keyword @interface is used to define it. |access-date=6 September 2012 |url-status=dead |df=dmy-all}}</ref> || {{yes|Class based}} |- |Positional arguments || {{no}}; unless a single argument || {{yes}} |- |Named arguments || {{yes}} || {{yes}} |- |Default values || {{yes|At definition}} || {{yes|Through initialization}} |- |Nested types || {{yes}} || {{yes}} |- |Specialization || {{no}} || {{yes}} |- |Conditional metadata || {{no}} || {{yes}} |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)