Comparison of C++ and Java in Implementing Introductory Programming Algorithms

  • Muhammad Shumail Naveed Department of Computer Science & Information Technology, University of Balochistan
Keywords: Programming Languages, C, Java, Introductory Programming Courses, Halstead complexity metrics


Computer programming is the heart of computer science and C++ and Java are the most popular and widely used languages. The performance of C++ and Java programming languages has been benchmarked using robotics, numerical, genetic and evolutionary algorithms, but not using introductory programming algorithms. This article examined C++ and Java by analysing the implementation of novice algorithms of introductory programming courses by evaluating the difficulty, effort, time and delivered bugs of programs with Halstead software metrics. The study identified that Java is more difficult than C++ in the implementation of selected algorithms. Similarly, the efforts required to translate the novice algorithms in Java are higher than C++. The time involved in translating selected algorithms in C++ is lower than Java. Similarly, the number of delivered bugs in C++ is lower than Java. The study suggests that C++ is more suitable than Java for the implementation of introductory programming algorithms and reasonably more suitable for introductory programming courses. The study emboldens the programming linguists to do further analyses in contemplating other programming languages with Halstead software metrics and other kinds of algorithms.

How to Cite
Naveed, M. (2021). Comparison of C++ and Java in Implementing Introductory Programming Algorithms. Quaid-E-Awam University Research Journal of Engineering, Science & Technology, Nawabshah., 19(1).