Thursday, December 12, 2019
Comparison Between Programming Languages C# And Java â⬠Free Samples
Question: Discuss about the Comparison Between Programming Languages C# And Java. Answer: Introduction Development of the software applications can be done in different programming languages can be implemented in different programming languages. Each of them has there advantages and drawbacks and are evolved rigorously from the point they are introduced. The popularity of the programming languages varies periodically. This popularity mainly depends on different features of these languages (Such as cross platform operability, ease of development)[1]. However, the following list of programming languages usually are the top ranked languages: C++, C, Java, C#, JavaScript, Perl, Objective-C and PHP. This paper consist of comparative study of the programming languages Java and C#. Even though both of them are object oriented programing languages, but there are some specific characteristics that makes them first choices for the development of specific type of applications. Characteristics of the both languages The following part of this paper contributes to the comparative study of the languages C# and Java. C#: In the year 2000, Microsoft announced the C# language along with the .NET framework. It is an object oriented programming language developed by Microsoft. The language is developed as a commendable successor to C++ and Visual Basic programing languages[2]. It runs inside a specific environment which is called .NET. For C#, the code written in this language is not interpreted. It is at first compiled in some kind of intermediate code. In the next stage, the intermediate code is compiled in JIT before the code is executed. Some other important features of this language are listed below, In this language, simple input-output or input output related file operations is more straightforward compared to the Java, and made more intense by introducing code formatting feature in the .NET framework. Objects of different classes can be serialized in either XML or parallel way. Specifically the XML format is regularly utilized between different programs. There is a Dispose method available for deterministic control of releasing the resources (Memory, Processor time) that are held by different classes of a program. In this language the lightweight objects Structs are accessible for the programs. This objects are assigned on the stack and are not subject to garbage collection of the program. Values of the variables are consequently changed over to objects and vice versa as required for a specific program. The foreach keyword helps in providing iteration over different types of objects created in a program (This iteration process is easier than, the iterators available in Java). Properties are provided by this programming language for all members in a specific class. For the definition, this language uses get and set methods. Multidimensional arrays are accessible in different forms as required by the developer. Rectangular arrays represents the contiguous block of memory. On the other hand the jagged arrays are mainly implemented as vectors of references to different sub-arrays used in the project. Java: James Gosling form Sun Microsystem developed and introduced Java in the year 1990. Even though the language was developed in order to program the home appliances but presently it is widely used to develop desktop as well secured web applications. Java has three unique structures, J2SE (Java2 Standard Edition), J2ME (Java2 Micro Edition), and J2EE (Java2 Enterprise Version). J2SE is appropriate for the desktop applications. J2ME is appropriate for implanted frameworks for smart phones, remote application and PDA programming. At last, J2EE is used for the development of server side programming. In C#, use of the pointer is only allowed in case the program needs to hold the memory address of different arrays and value types. On the contrary, for securing the developed application the in Java, it does not provide support to the use of the single pointers/pointer-arithmetic operations in the developed programs. Drawbacks of the languages For C# it can be sad that it is mainly dependent on the Microsofts .NET framework, thus it can be said that, this programing language is not flexible as it depends on .NET framework. Deprived of this specific component in C# applications are difficult to implement on different platforms. Java is considered as one of the pure object oriented programming languages used by the developers. It encourages the users to develop project using modular programs so that t can help in reusability of written code. Java is also open source[3]. Developers can utilize it for free on different platforms as it is platform independent too, which is a standout amongst the most important advantages of Java. Programs written a developed in Java can undoubtedly executed from one computer to another computer or operating system. With all this advantages Java additionally has a few disadvantages too. By different researchers it is found that, Java is a memory-consuming programing language[4]. Java is moderate since it has an additional layer between the frameworks and the system development projects (Java Virtual Machine (JVM) is the extra layer that helps in interoperability on different platforms)[5]. Anything done by the Java programs must be executed by the Java Virtual Machine. Challenges faced by the users In case of C#, the use of namespace is considered as a way to cluster a collection of developed classes which is similar to the packageconstruct of Java. Developers using the C++ programing language can easily notice several similarities among the C++ and C# namespace syntax(Cheng, et al. 2015)[6]. On the other and in case of Java, the package names describes the order the directory structure of the source code files in a specific application whereas for C#, the namespaces does not depict or provide the physical layout of source code files in the project directories. Rather it only depicts the logical structure of the source code files in the application. In order to declare constants in programs in Java language,finalkeyword is utilized. This variables can be set in either run time or compile time of the application. In case of the utilization of the finalis used for a primitive variable it helps in making the value immutable when they are used as object references[7]. Use of the final makes the reference variable to point to a single object in its lifetime. In C# or Java, It is not possible to define an immutable class through the language constructs. In addition to that, it is also not possible in java and C# to create a reference variable which is immutable. In case of java language, enumerated data types are considered as a complete class. Thus it implies that, this data types are typesafe and developers can extended this data type by adding different methods in the development of the applications, or even in the implementations of the interfaces in the classes[8]. On the other hand, for C#, the enumerated data type is a simply syntactic cover around that around the integral data type. Typically this is anint, which implies that, this data type cannot be extended as well as they are not typesafe. For nested classes, this can be implemented at anywhere or in any code block of any method. This feature is not available in case of the C# language in the .NET programing environment[9]. In Java language every method is virtual while in case of the C#, the programmer had to explicitly declare a methods to be virtual since in a default scenario they are not virtual methods. In order to mark a method in a program as virtual developers need to use the virtual keyword. Conclusion At the end it can be stated that, C# is intended for programming in the Microsoft .NET environment or Framework. This language consist of features which is a mix of the various other languages while having perfect balance between them. As an example it can be said that C# consist of concise use of the syntax is used in C is likewise added to this language. In C# use of syntax is more similar to the Java instead of to C++. Pointer memory administration in C# is no longer an issue as with the introduction of the garbage collection, much like Java. Use of the relational database frameworks (RDBMS, for example, Oracle, Mysql and SQL Server) with C# is much easier compared to other languages using the connection procedures. References Batool, Aisha, Muhammad Habib ur Rehman, Aihab Khan, and Amsa Azeem. "Impact and Comparison of Programming Constructs on JAVA and C# Source Code Readability." International Journal of Software Engineering and Its Applications 9, no. 11 (2015): 79-90. Cacho, Nlio, Eiji Adachi Barbosa, Juliana Araujo, Frederico Pranto, Alessandro Garcia, Thiago Cesar, Eliezio Soares, Arthur Cassio, Thomas Filipe, and Israel Garcia. "How does exception handling behavior evolve? an exploratory study in java and c# applications." In Software Maintenance and Evolution (ICSME), 2014 IEEE International Conference on, pp. 31-40. IEEE, 2014. Cheng, I-Ju, Po-Hsun Cheng, Shih-Yin Tsai, Pin-Hao Chen, Yen Jung Lai, Fu-Chien Yang, and Chi-Run Rau. "A comparison of Python and Java capabilities on somatosensory game for cloud-based rehabilitation system." In Consumer Electronics (GCCE), 2015 IEEE 4th Global Conference on, pp. 660-661. IEEE, 2015. Gokhale, Parag, and Sachchidanand Singh. "Multi-platform Strategies, Approaches and Challenges for developing Mobile applications." In Circuits, Systems, Communication and Information Technology Applications (CSCITA), 2014 International Conference on, pp. 289-293. IEEE, 2014. Heaton, Jeff. "Encog: library of interchangeable machine learning models for Java and C#." Journal of Machine Learning Research 16 (2015): 1243-1247. Kim, Donghoon, and Gangman Yi. "Measuring syntactic sugar usage in programming languages: an empirical study of c# and java projects." In Advances in Computer Science and its Applications, pp. 279-284. Springer, Berlin, Heidelberg, 2014. Tillmann, Nikolai, Judith Bishop, Nigel Horspool, Daniel Perelman, and Tao Xie. "Code hunt: searching for secret code for fun." In Proceedings of the 7th International Workshop on Search-Based Software Testing, pp. 23-26. ACM, 2014.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.