Both Java and C # have improved the complex and obscure Syntax of traditional C ++. In terms of syntax, both of them discard the flashy aspects of functions and their parameters in C ++, such as const modification, macro replacement, global variables, and global functions. In terms of inheritance, both adopt a more understandable single-inheritance and multi-interface implementation scheme.Source codeIn terms of organization, a logical encapsulation of declarations and implementations is proposed.
Compared with the Java language, C # also has its unique advantages: the Visual Studio development platform provided by Microsoft can greatly improve C #ProgramAnd Microsoft is better at using the Windows platform than Java. When C # is used to create a Windows Service, record Windows event logs, and access the Windows registry,. NET is indeed more convenient. Microsoft provides a large number of features related to Windows tasks, allowing programmers to quickly develop applications through wizard, drag and drop operations, so it is easier to use.
Java is designed independently of any platform and naturally does not provide many windows features. But this is also the advantage of Java: cross-platform.