This morning, one of our automation testing trainers faced a nice question. Why C or C++ is not used in Electronic Devices such as Microwave Ovens, Toasters, etc. As usual, this was raised during our software training session. We run Selenium Automation Testing Training in Chennai. The very first part in learning Selenium is learning Selenium IDE. For learning Selenium IDE, no programming skills are required.
After learning IDE, we will introduce Selenium RC and Web driver. As Java is predominantly used in many ways in the Electronic devices, Web applications, etc., we train core Java for Automation testing training. During the introduction session of Java, our trainer narrated the history of Java. How it evolved? The very first name of Java is not Java – It is Oak. Later it was changed to Java.
Though Java is evolved from C and C++, it has a lot more than those two. Java inherits the syntax of C and the Object Orientation from C++. One good thing about Java is, we can use Java for Web Applications. Now, you may have this question- Can’t we C++ for Web Applications? No. Do you know why? C and C++ uses the concept of Pointers. If we use Pointers in Web applications, there is a high probability that we may end up with Security concerns. Java never uses Pointers. That is one of the good reasons – Why Java is alone (and not C, C++) used for Web Applications.
Our trainer narrated more than this. He told the trainees that in embedded systems like Microwave Ovens, Toasters, etc., Java is used. One of our students immediately raised the voice ‘Why Java and why not C and C++?’ The answer is simple. C and C++ needs compilers in every electronic devices to compile the programs into Object files. And the compilers will be costly and will take time for compiling. In Java, the code is converted directly into Byte codes. Thus the cost and time will be less! This could be one of the reasons. Moreover, Java is Platform Independent language – this could be another.
Do you have any more answer for this? Kindly share! Let us create a world of Platform independent and Open source software!
See you in another post! Bye!! Have a nice day!