Java and C# more or less match with each other.Java is influeced by C++ whereas C# is enhaced version of C++. C# derives from C/C++ with modernization and type safety- to adapt the changes in environment and to implement advances in the art of programming.
In Java the return type ofmain() is void whereas in C#, We are not restricted only to void we can also also have int.
In Java pointers does not exist and was not designed to be compatible with any other languge. Although the default for C# code is safe mode , we can declare classes or method to be unsage This enable us to use pointers , structs andstatically allocated arrays.Both the safe mode and unsafe code run in the managed space , which implies no marshalling is incurred when calling unsafe code from safe code.
In Java the main(), if there are no parameters required we still need to incle the command line parameters array. This is not the case with C# we can declare Main() as
public static void Main(){...}
Although Java supports constructors, it doesn't have destructors. Whereas in C# we have destructors to release all the expensive resources even though we have garbage collector, which does the same - isn't invoked immediately after the variable goes out of scope, but only at certain intervals or memory conditions.
In Java it is not possible to declare unsigned integers whereas in C# POS type system i.e., intended to support the complete implementation of a wide range of programming language makes us impossible to declare unsigned integers.
check this page for more
What are the differences between c#.net and java?
"The CLI and C# have many similarities to Sun's JVM and Java. They are strong competitors. Both are based on a virtual machine model that hides the details of the computer hardware on which their programs run. Both use their own intermediate byte-code, Microsoft calling theirs Common Intermediate Language (CIL; formerly MSIL) and Sun Java bytecode..NET in its complete form (Microsoft's implementation) is currently only fully available on Windows platforms and partially available on Linux and Mac, whereas Java is fully available on nearly all platforms." - Wikipedia
Basically, .NET is made by Microsoft where you have to buy their development software and usually works only on Windows. Java is made by Sun and works on Windows, Mac, and Linux, and free development software is available such as Eclipse http://www.eclipse.org/ and others.
Reply:C++ (pronounced "see plus plus", IPA: /siː plʌs plʌs/) is a general-purpose programming language with high-level and low-level capabilities. It is a statically typed, free-form, multi-paradigm, usually compiled language supporting procedural programming, data abstraction, object-oriented programming, and generic programming.
C++ is regarded as a mid-level language. This indicates that C++ comprises a combination of both high-level and low-level language features.[1]
Dr. Bjarne Stroustrup developed C++ in 1979 at Bell Labs as an enhancement to the C programming language and named it "C with Classes". In 1983 it was renamed to C++. Enhancements started with the addition of classes, followed by, among other features, virtual functions, operator overloading, multiple inheritance, templates, and exception handling. The C++ programming language standard was ratified in 1998 as ISO/IEC 14882:1998, the current version of which is the 2003 version, ISO/IEC 14882:2003. A new version of the standard (known informally as C++0x) is being developed.
.net (network) is a generic top-level domain (gTLD) used on the Internet's Domain Name System. The .net gTLD is currently operated by VeriSign. Registrations are processed via accredited registrars and internationalized domain names are also accepted (see details).
.net is one of the original top-level domains (despite not being mentioned in RFC 920), created in January 1985. It was initially intended for use by network oriented entities such as Internet service providers. Currently, there are no formal restrictions on who can register a .net domain name. Therefore, while still popular with network operators, it is often treated as a second .com.
In addition to being an abbreviation for "network", "net" is also a romanisation of the Russian word нет ("no" or "not", also commonly romanised as the more acoustically appropriate "nyet"), and a domain name like "object.net" can be interpreted as "there is no object". Some domains exploit this pun, for example mozga.net (brain absent) or putina.net (not Vladimir Putin) and DamoW.net (there is no Damien Walsh).
Some online poker or other gambling sites operate real-money games at a .com address and games without actual stakes (promoted as being for fun or education) at the same name in .net. This can be used to get around legal issues regarding the advertising of online gambling in the United States, since the .net site can be promoted legally, but such promotion helps make people aware of the name of the real-money site even in jurisdictions where such things are of questionable legality.
Java is a programming language originally developed by Sun Microsystems and released in 1995 as a core component of Sun's Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode which can run on any Java virtual machine (JVM) regardless of computer architecture.
The original and reference implementation Java compilers, virtual machines, and class libraries were developed by Sun from 1995. As of May 2007, in compliance with the specifications of the Java Community Process, Sun made available most of their Java technologies as free software under the GNU General Public License. Others have also developed alternative implementations of these Sun technologies, such as the GNU Compiler for Java and GNU Classpath.
Java's design, industry backing and portability have made Java one of the fastest-growing and most widely used programming languages in the modern computing industry.
Reply:I've never done C#, but I have done C++. Let me tell you, if they are anything alike, they are both very similar to Java. The syntax is a little different, but there are plenty of similarities.
C#.net is part of the .net framework, which is all microsoft. Java, however, is made by Sun Microsystems and is compatible with different platforms. .Net is good if you are learning other Microsoft based languages, such as vb.net
violet
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment