AAWhat is a programming linguistic communication? In a simple account, it is used to compose direction to the computing machine to execute certain maps. In the market, there are many types of popular linguistic communications, such as Java, C # , C++ , Visual Basic, and so on.
Programing linguistic communications are apprehensible by worlds, but non computing machines, as computing machines can merely understand machine linguistic communication of 1 and 0. Even though scheduling linguistic communications are apprehensible by worlds, larning to understand programming linguistic communication is like larning Gallic or Nipponese. It merely depends on which we choose to larn.
In this papers, we will further analyze with these 2 popular scheduling linguistic communications being used: Java and C # .
Java, the name which was come from the java ‘s name, was foremost introduced by Sun Microsystems ( now acquired by Oracle ) into the public back into May 1995. Since so, it became really popular among the developers that started to utilize Java to develop their applications, such as e-commerce applications, large-scale endeavor applications, web pages ‘ dynamic contents, and so on. Harmonizing to java.com, Java powers more than 4.5 billion devices, including Personal computers, nomadic phones, hand-held devices, smart cards, games, GPS, medical devices, and so on. Java was besides designed to be used and work normally over the web, like intranet and cyberspace.
Java platform is divided into 2 parts: Java application programming interface and Java practical machine ( JVM ) . Both of them have their ain maps of making different things. Java application programming interface has the capableness of planing the codifications and interfaces, such as making graphical user interface, execute file input and end product, and set up web communications. Java practical machine does non make anything of planing. Alternatively, the JVM is responsible for put to deathing the codifications designed with the API in the coveted environment.
In points below, we discussed a random 5 characteristics of Java programming linguistic communication.
Java linguistic communication is designed to be every bit simple as possible, in a manner that it is easy to larn. As we all know that English words are made up of 26 characters, and many words can be constructed with these 26 characters. Their statements and keywords are English-like words that made the developers has an easier manner to understand.
Java uses object-oriented programming methodological analysis. Objects ( Abstract of information ) , Classes ( A set of objects that portion the same property and operation ) , Generalization and Specialization ( heritage of general properties from abstract categories to concrete categories ) , Message-passing and Encapsulation ( communicating between objects, and object presentation mechanism ) , Polymorphism ( appropriate respond to message passed to the having objects ) are some of the common footings used in OO attack.
Unlike any other scheduling linguistic communications, an translator is used in Java to construe the beginning codes into bytecodes. Java compiler, which is a constituent of the J2SDK, is responsible of interpreting the beginning codes into bytecodes at runtime and executes it. With the aid of the compiler to roll up the beginning codifications for merely one clip, the bytecodes can so be executed in any environment. From the bytecodes, it will so interpret the codification with an translator into machine linguistic communication of the platform, which is apprehensible by the computing machines.
Thankss to the translator, the Java beginning codifications that had been compiled into bytecodes can be reassign into any platform. It does non alter the codification on the peculiar platform. For illustration, we can develop the application in a Microsoft platform, and so utilize the finished application in a Linux platform. The in-between adult male that is needed is the JVM, which so will change over the bytecodes into the machine linguistic communication.
In Java scheduling, it follows some really strong regulations, such as you must declare a variable with a type. For illustration, a variable “ name ” is declared without the type is non complete. We do non cognize it is a text or figure. In order to do certain that the variable name is a text, it should be declared as “ twine name ” . Besides, Java besides have several alone mechanism, such as automatic memory direction, utilizes ( automatic ) refuse aggregation, and exclusion handling mechanism.
C # , which is pronounced as “ See Sharp ” , can be considered as a replacement of the scheduling linguistic communication C++ , merely like C++ is a replacement of C linguistic communication. It was introduced by Microsoft back in the twelvemonth 2000. It can utilize either Microsoft Visual C # platform or Microsoft Visual Basic platform to execute scheduling. Most of the scheduling linguistic communications, including C # , are English-like statements, much similar to Java. It is simple and apprehensible by worlds.
To utilize C # , we are required to buy a valid licence from Microsoft, either for Microsoft Visual C # or Microsoft Visual Studio. Installing either one of the mentioned application is adequate to utilize C # programming linguistic communication to develop an application, in a Microsoft Windows platform, depending on the version of the merchandise we used.
Integrated Development Environment ( IDE )
Microsoft Visual Studio has an integrated development environment ( IDE ) . This IDE is widely usage in assorted intents, such as aids in developing Windowss applications, design applications and user interface, composing codifications, and proving the running codifications. Most windows applications have a graphical user interface and it is event-driven. Therefore, categories and events are widely use in the applications developed by C # .
A alone characteristic of C # is its capableness of interacting utilizing.NET model. The.NET Framework is an built-in Windows constituent for edifice and running the following coevals of package applications and Web services. Some of the nucleus constructs of the.NET Models are Common Intermediate Language ( CIL/MSIL ) , Common Language Runtime ( CLR ) , .NET Framework category libraries, .NET languages, Windows signifiers, ASP.NET, and Web services.
CIL and CLR
After codifications are written, Visual C # /Visual Studio can roll up its codifications with the aid of.NET model, utilizing CIL and CLR. It allows the structural optimisation of pre-compiled codification along with the portability of taken codification, merely means that different coder can therefore use different linguistic communications interchangeably within the applications allows different squads to work on the same web site or application in different linguistic communications.
Similarity of Java and C #
1 obvious similarity of both linguistic communications is they are English-like statements. Their cryptography statements are easy to understand. Keywords such as public, utilizing, if-else statements, and so on are simple English words that has their similar significance with the linguistic communication itself. Therefore, larning both programming linguistic communication is every bit easy as larning English linguistic communication.
Object-oriented linguistic communication
Both Java and C # are object-oriented linguistic communication. Both of them portion the construct of object-orienting scheduling. They have objects incorporating informations and pull stringsing them, classes that place the objects, uses heritage for the categories, execute encapsulation for message-passing and use polymorphism.
In footings of plan construction, they are more or less the same in declaring variables and composing the statements. Let ‘s hold a expression at both the Hello World plan.
Table – “ Hello World ” plan in different linguistic communication
As we observed from the 1st line, their remarks are written with a dual cut ( // – for individual line remark ) or a cut followed by an star so ends with an star with a cut ( /* aˆ¦ */ – for multiline remarks ) . Then, both plans begin with a keyword ‘class ‘ . They have a chief method, which is declared with a inactive qualifier, intending that it operates without mention to any other objects. Hence, the chief method serves as the get downing point to the plan. Then, the end products of the plans are produced by the ‘println ‘ method of ‘out ‘ category and ‘WriteLine ‘ method of ‘Console ‘ category, both in System namespace. The end product of these plans is the same: ‘Hello World ‘ .
Declaring informations types and variables
Common informations types in both the linguistic communications, such as int ( whole number ) , threading ( sets of characters ) , char ( character ) , dual ( double-precision drifting point ) , float ( single-precision drifting point ) , and so on, are widely used in the linguistic communications, besides declared in the same form. For illustration: we can specify a monetary value with the statement ‘double monetary value ; ‘ , or another illustration: declaring a ‘description ‘ object with ‘string ‘ type with some text with this statement: ‘string description = “ This is how we declare ” ; ‘ .
Operators are widely used in scheduling, with no exclusion to these two linguistic communications. They have besides used the same manner to specify the operators to compare consequences and puting conditions to continue into other instructions. Operators ( with one illustrations ) such as arithmetic operators ( ten + Y ) , unary operators ( x++ ) , relational operators ( x & lt ; y ) , conditional operators ( ten || Y ) , logical operators ( x & A ; y ) , assignment operators ( ten! = Y ) , and others, are widely used in the applications developed by the linguistic communications.
The statement tells what the plan to make. These two linguistic communications have different sort of statements which are used about the same manner in composing the block of statements. Statements such as if-else statement, while statement, for statement, return statement, and so on are good illustrations to demo to similarities. Examples are as follows:
Table – Some common statements with illustrations in Java and C # linguistic communication
Differences of Java and C #
Both linguistic communication have 1 major difference, which is their platform dependence. Java is platform-independent, merely means that we can put to death the plan anyplace. Unlike C # , which is platform-dependent, Java can be written on any platform ( illustration: Microsoft ) , and run the written plan on another platform ( illustration: Linux ) . This makes Java a alone characteristic over C # ,
Harmonizing to Microsoft, C # is standardized by ECMA International as ECMA-334 criterion and ISO/IEC criterions as ISO/IEC 23270. Since it is standardized, it has a certain sum of regulations that C # have to be followed, therefore its flexibleness is limited. Unlike C # , Java is unfastened beginning. It can be controlled by an unfastened community or any package developers as they wished.
.NET model support
Another difference is the.NET model support on the C # development environment ( Microsoft Visual Studio ) . .NET can roll up the codifications into CIL so be executed through the CLR. Thus, adding the advantage of utilizing different linguistic communication on a individual application that can interact together. C # makes a clear victor of this characteristic over Java.
File extension of the beginning codifications are different. For Java, the beginning codifications are stored in.java extension. While for C # , the beginning codifications are stored in.cs extension. After the beginning codifications had been compiled, an feasible file is generated. For Java, the compiler generates a.jar extension file, with an extra file called.class files ( depends on how many beginning codifications file are compiled ) , which shops the bytecodes of the Java beginning codifications. For C # , it generates an.exe or other extensions such as.dll extension file, depending on their execution of applications or others.
Choices of identifiers and keywords
Harmonizing to Shyamal ( 2004 ) , there are 51 keywords in Java and 77 in C # . From the obvious figure, C # has more picks compared to Java. Even though there is non much difference between the keywords of both linguistic communications, there are some that serves different intents.
Below tabular array are the keywords introduced in Java specifications and C # specifications:
C # keywords:
Below tabular array was introduced by Shyamal ( 2004 ) are the differences of the keywords in both linguistic communications.
Table – Keywords that are non available in each scheduling linguistic communication ( with equivalent in paratheses of opposite linguistic communication )
Even though both the linguistic communications support exclusion handling, there is 1 obvious difference about the two linguistic communications. It is clear that Java supports checked exclusion and C # does non. A checkered exclusion requires the compiler to manage and look into for exclusions, while the unbridled exclusion does non. Some illustrations of checkered exclusions are invalid input, database jobs, file losing, and so on. Then, a ‘throws ‘ clause must be mentioned.
1 of the characteristics of C # is it supports user-defined operator overloading. It is a powerful characteristic that allows the mathematical and logical operations to be done in an overladen method. Unfortunately, operator overloading is non supported by Java. Below is an illustration of utilizing operator overloading:
Why I choose Java? Advantages over other linguistic communications
Possibly taking a suited scheduling linguistic communication or debating on which programming linguistic communication is better is a really subjective treatment on every package developers. In another point of position, it is merely like taking a shoe between a Nike branded and an Adidas branded. Below are my positions of why I choose Java alternatively of C # .
One of the advantages of Java programming linguistic communication over the others is because Java is a free beginning linguistic communication. Without paying any costs of trueness or licensing, we are free to utilize Java at its full characteristics to develop any sort of package applications. Who would hold non desire freebees alternatively of paid goods while both of them had the same characteristics?
Most of the scheduling linguistic communications like Visual Basic and C # are required to buy from Microsoft, and are merely able to run merely in its ain platform. Unlike C # , Java is able to be used anyplace the developer wants and run at any platform the developer wants. It is platform independent, allows the flexibleness of application to run at any platform. It solves the job for developer to check their caput to happen suited solutions for different platforms.
In programming linguistic communication, the package developers may utilize different linguistic communications. Harmonizing to langpop.com ( extracted at Oct 2010 ) and besides O’Reilly ( 2006 ) research on ‘Programming Language Trends ‘ ( based on the figure of books of the scheduling linguistic communication sold ) , it shows that Java beats other programming linguistic communications, intending that Java has the highest popularity searched. Take Nike as an illustration, its popularity has gained trust in many people because of its quality. Even in educational sections, like our college themselves, besides prepare the pupils Java cognition to the industry needs in the hereafter. This is one of the grounds that I had adopted into Java programming linguistic communication.
Harmonizing to Graham Hamilton in an interview by Janice J. Heiss ( 2004 ) , Java linguistic communication is powerful and simple, easy to understand in a clear and consistent significance. He emphasized that the rule of James Gosling ( developer of Java programming linguistic communication ) in his creative activity of Java programming linguistic communication is to be preserved as it evolves. 1 of the rule is Java scheduling is meant to be easy to read than to compose. Compared to C++ , it should n’t be every bit complex as C++ seems to be. Who would hold non wanted a simple and easy manner to work out jobs?
Possible jobs and options to work outing it
Although Java is a free unfastened beginning scheduling linguistic communication used by many people, happening a dependable beginning to our jobs become somewhat hard to us. Unlike C # that has a library of solutions defined harmonizing to their criterions, Java ‘s solution is defined by the unfastened community. One simple job may hold 1000s of solution can be found. Therefore, I will happen few possible solutions suggested over the cyberspace, and do proving through the solutions and do my ain version of the solutions. Although it is clip devouring, we may derive more experience from making these research.
As we know Java is a platform independent linguistic communication, it can run on any operating systems. If we are luckless to be instructed to utilize other runing systems that we are familiar to develop a Java application, larning to utilize other sorts of runing systems can be another job for busy people. Knowing how to utilize the peculiar operating system is a whole new experience to most people. For me, I would wish to accept it instead than deny it ; it has no injury to larn new things.
I had ever used to compare Nike branded ware with Adidas branded ware. Both of these trade names are merely like comparing Java and C # . They have a batch in common, like Java and C # . Both of the linguistic communications are simple and easy to understand, object-oriented, and composing the codifications in some common ways such as declaring variables, specifying categories and so on.
Most scheduling linguistic communications have their ain unique characteristics that attract specific package developers, even for Java and C # . Java attracts the package developers with its platform independency characteristic, while C # made its manner to the package developers with its full linguistic communication support from Microsoft.
Which scheduling linguistic communication is better? It depends on how package developers would wish to specify it. Some people would take Java ; some people would take C # .