0% found this document useful (0 votes)
75 views10 pages

Dejan Viduka

The document analyzes and compares Python and Java for their suitability for beginners learning programming. It discusses that both languages are commonly used in education and have value for further development. Java is described as a platform-independent language that is faster than Python but slower than C++. It is fully object-oriented and commonly used to develop Android and web applications. Python is presented as an older language that has gained popularity for its simple syntax and is appreciated by experienced programmers for solving complex problems.

Uploaded by

stella
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views10 pages

Dejan Viduka

The document analyzes and compares Python and Java for their suitability for beginners learning programming. It discusses that both languages are commonly used in education and have value for further development. Java is described as a platform-independent language that is faster than Python but slower than C++. It is fully object-oriented and commonly used to develop Android and web applications. Python is presented as an older language that has gained popularity for its simple syntax and is appreciated by experienced programmers for solving complex problems.

Uploaded by

stella
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

QUAESTUS MULTIDISCIPLINARY RESEARCH JOURNAL

A COMPARATIVE ANALYSIS OF THE BENEFITS OF


PYTHON AND JAVA FOR BEGINNERS

Dejan VIDUKA,
Vladimir KRAGULJAC,
Boris LIČINA

Abstract: Programming has developed so much that it is present in all


areas of human life, and even greater presence is expected in the near
future. The main criterion for training new developers is the choice of
programming language. This criterion is usually chosen by experienced
programmers based on the need and applicability of a particular
programming language. For beginners, such a task is more difficult given
that they have little or no initial knowledge. The beginning of learning poses
a large number of challenges to the user, each of which can affect the
continuation of learning and achieving the ultimate goal, ie. mastering a
programming language. The choice of language at the beginning
additionally burdens beginners, because due to the wrong choice, it is
easily possible for them to lose interest in further learning. There are a
number of programming languages on the market, and some of them can
be very complicated for beginners. All this sufficiently emphasizes the
importance of choosing the appropriate programming language for
beginners. In this paper, two very popular programming languages, Java
and Python, are analyzed. Their main characteristics, the most common
ways of application, as well as the author's recommendations are
discussed.
Keywords: Analysis, Comparison, Programming Language, Python, Java,
Education.

INTRODUCTION
The myth that people are born destined for the profession of programmer
is something that we will certainly not discuss, because there are ubiquitous
examples of how much can be achieved through work, and that is how we will
look at this topic. Programming is learned like any other science or craft. It is
necessary to start gradually with easy tasks that are adapted to beginners, and in
which they can easily recognize the real-life application. The basic task in
learning programming is developing logic and the programming way of thinking
needed to solve problems effectively. It can often be heard that it is necessary to

318
QUAESTUS MULTIDISCIPLINARY RESEARCH JOURNAL

choose one programming language and use it to learn the basic principles of
programming (Khoirom et al., 2020). This statement should be taken as the view
that a programming language is still only a technology used in communication
between computers and humans. From a craftsman point of view, and in the way
it is most often done in informal trainings, it makes sense to learn everything
using one language. On the other hand, if we are thinking long-term or dealing
with formal education, it is very important to learn from the very beginning how
to approach problems well, and thus how to achieve their efficient solution by
applying one of many available technologies.
Coding is a narrower term that denotes the ability to write code.
Programming is the ability to transcribe a good idea into a solution to a given
problem, and includes analysis, understanding of data structure, coding, etc.
Today, developers have a number of programming languages available (Avouris
et al., 2017). Each of them has its advantages and disadvantages, but each can be
used to solve various tasks. The choice of programming language usually
depends on the need, but also on the preferences of the user.
It is normal for beginners to think differently from experienced
professionals, so it is very important right at the beginning of the decision to
choose a programming language for learning to guide them on a path that will,
in the simplest and most accessible way, allow them to master the material. When
choosing a language, several factors must be taken into account, and the basic
questions are what it will be used for, what are the previous occupations of the
user, and whether documentation is available and to what extent. (Khoirom et
al., 2020) All three factors are very important, but documentation has proven to
be crucial in many cases. So often among professionals it can be heard that they
have learned programming through the official documentation of a particular
programming language.
Two very popular programming languages are considered in this paper.
Each of them has certain advantages, but also disadvantages. When choosing
which of them would be the better choice for the first programming language,
one should consider as many of their features as possible and, based on that,
decide on one. (Khoirom et al., 2020) Of course, it is desirable to know several
programming languages, but one must be chosen to begin with.
Java is definitely one of the most popular programming languages with
a wide range of usability. On the other hand, Python is an older programming
language than Java, and in recent years it has gained increasing popularity
(Lakshminarayanan and Prabhakaran, 2020; Girma et al., 2020) among
beginners due to its simple syntax. This simplicity is highly appreciated by more
experienced users who use it to solve serious tasks.

319
QUAESTUS MULTIDISCIPLINARY RESEARCH JOURNAL

OVERVIEW
From the multitude of programming languages available today, we
chose these two because they have proven to be a common choice suitable
for training beginners, and at the same time have a value for later
development. A large number of schools, starting from primary, to
secondary, all the way to universities, use some of these two programming
languages in their teaching. (Kohn, 2017; Moumoutzis et al., 2018) In
addition, they are leaders in all rankings of popularity among programming
languages used in real work, so it is no wonder that they are also used in
education. Additionally, because of the popularity they have gained and
because of the opportunities they provide, there is a great demand for staff
who use them. From the multitude of programming languages available
today, we chose these two because they have proven to be a common choice
suitable for training beginners, and at the same time have a use value for
later development. A large number of schools, starting from primary,
secondary, all the way to the faculty, use some of these two programming
languages in their teaching. (Kohn, 2017; Moumoutzis et al., 2018) In
addition, they are leaders in all rankings of popularity among programming
languages used in real work, so it is no wonder that they are also used in
education. Additionally, because of the popularity they have gained and
because of the opportunities they provide, there is a great demand for
employees who use them.

JAVA PROGRAMMING LANGUAGE


The Java programming language was created in 1991, and was
officially introduced in 1995 (Michael Mutongwa and Abeka, 2019). Its
main advantage is that it is platform-independent, ie. has the slogan WORA
(Write Once, Run Anywhere), or WORE (Write Once, Run Everywhere).
(Khoirom et al., 2020) It is a compiler language and compared to Python it
is much faster, but again slower compared to C ++, for example (Gamua,
2020). Some of the most well-known companies that use it in their work are
Uber, Pinterest, Airbnb and LinkedIn. In addition to the above, a large
number of other technology companies use Java in their daily work.
Some of the features of Java are:
- It is a completely object-oriented language (OOP) (Michael Mutongwa
and Abeka, 2019)
- It is independent of the platform on which it will be executed - during
compilation, a platform-independent program is obtained, and for its

320
QUAESTUS MULTIDISCIPLINARY RESEARCH JOURNAL

execution only the appropriate Java virtual machine (JVM) is needed.


It is this ability that makes Java a frequent choice when a software
solution is needed that will run in different environments (Mahmood
and Mahmoud, 2018).
- High level of security - since Java uses its own runtime environment
(JVM), full control over data types and execution times is enabled
(Gamua, 2020).
- Exceptional robustness - Java has implemented capabilities for
powerful memory management with automatic release of unused
objects (Docampo et al., 2013).
- Multithreading - Java has all the features of multithreaded
programming languages, which helps to create highly interactive
applications that efficiently perform multiple tasks at the same time
(Penha et al., 2005).
These capabilities of the Java programming language lead to its wide
application, and some of the most common are:
- Android applications - Java is one of the popular languages for
developing Android applications. It is currently competing with the
Kotlin programming language, but before its creation, Java was almost
the only language for this purpose (Gamua, 2020).
- Desktop applications - Java is used to develop desktop applications
with a fully developed graphical user interface (GUI), which allows
easy use by the end user. (Michael Mutongwa and Abeka, 2019)
- Web applications - Java is also used to create web applications. Such
applications are characterized by the fact that they are easy to encode,
and they also bring high security, so they are used in areas such as e.g.
health, education, banking and insurance.
- Cloud Computing Applications - which provide savings on IT
infrastructure. It is also used to develop modern software such as SaaS
(Software-as-a-Services), IaaS (Infrastructure-as-a-Service) and PaaS
(Platform-as-a-Services) (Khoirom et al., 2020).
- Big Data Applications - due to its speed, reliability and robustness, Java
is also used for data mining. Java, with its powerful memory
management, is a great choice for this purpose. (Akbar and Kak, 2020)

PYTHON PROGRAMMING LANGUAGE


The Python programming language originated in the late 1980s. Its
author is Guido van Rossum (Shi, and Chen, 2020) from the Netherlands.
Python is a dynamic programming language, which means that the

321
QUAESTUS MULTIDISCIPLINARY RESEARCH JOURNAL

programmer does not have to define variables' data type and there is no need
to compile. It is also characterized by a very simple syntax (Šandrih, 2018),
so for many developers it is often the first choice because of that, but also
because of the coding speed (Avouris et al., 2017). Its popularity is growing
rapidly, especially today as it is increasingly used in science (Shi and Chen,
2020). Companies that use it include Google, Instagram, IBM, NASA,
Amazon, YouTube, Reddit, Facebook, and Spotify (Lakshminarayanan and
Prabhakaran, 2020; Girma et al., 2020).
Some of the Python’s stand-out features are:
- Ease of use - due to its simplicity, it is easy to learn and use, but that
does not prevent it from performing very complex requirements
(Avouris et al., 2017).
- It’s free and Open Source (Karnalim and Aldiansyah, 2017) - it is
available to everyone, and a large community of developers participates
in its development, constantly improving it by improving performance
and eliminating observed errors. Its source code can be freely
downloaded, modified, used or distributed.
- High-level language - Python is a high-level language, but that doesn't
prevent it from managing a computer's architecture and memory very
efficiently.
- Portability - the same Python program can be executed on various
platforms such as Unix, Linux, Windows (Brand et al., 2018).
- Interpreted language - this means that a program written in Python does
not need to be compiled, and that it is executed in the order in which it
was written. This property allows errors to be easily detected and
eliminated, but it is therefore slower than programming languages that
are compiled, such as Java and C ++.
- Object Oriented (OOP) (Karnalim and Aldiansyah, 2017) - this provides
code reusability and programs are written with fewer lines of code,
which indirectly has a positive effect on the speed of their execution.
- Extensibile and embedded - code written in Python can be used within
programs in other languages such as C or C ++. The same code can later
be used in Python. (Colliau, 2017)
- There are a large number of extensive standard libraries - this allows the
availability of a wide range of modules and functions, which simplifies
coding and significantly speeds it up, because it is possible to use them
directly immediately after importing to the program (Khoirom et al.,
2020).
Python is widely used, and some of the most common usages are
(Lakshminarayanan and Prabhakaran, 2020):

322
QUAESTUS MULTIDISCIPLINARY RESEARCH JOURNAL

- Artificial intelligence and machine learning - these two areas are in great
expansion today, so the popularity of Python as a programming
language is increasing. Its characteristics of being stable, secure and
flexible make it a very common first choice for such projects.
- Data Science and Data Visualization - Python is the preferred language
for data analysis and visualization by most professionals (Girma et al.,
2020; Shi and Chen, 2020).
- Game development - a large number of available libraries greatly
facilitates the creation of games.
- - Web development - tools such as Django, Flask and Pyramid, which
have Python as a basis, provide a fast, easy and reliable way to develop
web applications that are adorned with security, scalability and
flexibility, but unfortunately not speed.
- Desktop applications - Python allows the development of great desktop
applications, and with tools such as Tkinter it is possible to create a very
likable and user-friendly user interface. (Hussain and Khan, 2018)
- Web scraping applications - Python does an excellent job of collecting
data from the Internet that can later be used for various analyzes or other
business uses. (Khoirom et al., 2020)

RESEARCH ON IT STUDENTS
As part of the writing of this paper, a small-scale research was done
with final year IT students. The research was conducted using an online
questionnaire, and included 76 students. All students have had contact with
both programming languages during their schooling so far. The results of
the research confirmed the previously mentioned empirical assumptions and
helped to draw conclusions.

- The main question was “which programming language was easier to


learn?” The answers showed that 89% of respondents said that Python
is easier to learn and easier to use.
- The second question required the respondents to state what are the
opportunities in their future careers that they consider important with
these programming languages. In this case, the majority (93%) knew
what can be done with the Java programming language, and a
significantly smaller number (37%) what could be done with Python. It
is interesting that almost all students mentioned Android programming
and connected it with the Java programming language.

323
QUAESTUS MULTIDISCIPLINARY RESEARCH JOURNAL

DISCUSSION
Considering that only two programming languages are used in this
analysis, we must explain why this is so. Both languages have their own
history and very great use value in practice, especially when it is known that
both are transferable to different platforms. Both languages are also
preferred by the large community of developers who support them. The
large community plays an important role for both languages, as it helps
beginners to overcome the obstacles they encounter in learning.
The task set is to compare the two programming languages, which
is very difficult, because each of them has its advantages and disadvantages
in different areas of application. Java has a more complex structure than
Python (Michael Mutongwa and Abeka, 2019), and Python is simple and
easy to learn and code (Olsen, 2018). In Python, line indentation is
mandatory, which makes the code clearer and easier to read (Fagan and
Payne, 2017), while in Java it is not mandatory to indent, and the entire
program can be written in one line. Java requires the use of semicolons (;)
as end-of-line tags, which is often a problem for beginners because they
omit it, so the program reports an error.
The final judgment certainly depends on the task of a particular
project in which some of the offered programming languages will be used.
For example. both languages are often encountered in schools, but Python
is still given a slight preference precisely because of its simple syntax and
ease of use. This by no means means that it is less valuable and that it must
and can be used only in education, because the fact that it is so represented
in schooling gives it additional weight in later use. Of course, in some future
work, it would be good to compare these two languages with some of the
other more commonly used general-purpose languages or those that are
intended for specific tasks.

CONCLUSION
In this paper, the possibilities of two programming languages are
considered, and it is very difficult to determine which is better to start
learning. According to the students who learned both programming
languages during their education, it is Python, but at the same time they
have little knowledge of what they can do with the knowledge of that
language later. Both languages are portable and allow learning on a variety
of platforms. Both are very powerful for developing various tools.

324
QUAESTUS MULTIDISCIPLINARY RESEARCH JOURNAL

The programming language that will be used should be chosen


depending on the desired purpose, but our question is which one should be
chosen to start learning programming from scratch. In practice, it would be
good to choose one language and one language only it until it is learned, ie.
mastered to a satisfactory extent. This way, student satisfaction is achieved,
and the goal of learning is achieved. In our opinion, the best choice for
mastering programming is Python, which has a less steep learning curve,
and at the same time provides solid application later in employment. This
does not mean that Java is a bad option, but only that it is more convenient
as a second language, that is subsequently learned if the need arises.
When a student masters a programming language to a sufficient
extent, and through it learns the main principles in coding and, more
importantly, the correct way of thinking, he can easily master some more
complex programming languages later. Earlier, Pascal was taught as a first
language in schools, which fulfilled the goal of learning the basics of
programming well, but its later use value became lower and lower over
time. As Python and Java are used in modern education, we can freely say
that from that point of view, the educational process has progressed towards
a greater use value of the acquired knowledge. This should be the main goal
of programmer education.

References
Akbar, Shayan A., and Kak, Avinash C. A Large-Scale ComparativeEvaluation of IR-Based
Tools for Bug Localization. In 17th InternationalConference on Mining Software
Repositories (MSR ’20), October 5–6, 2020, Seoul, Republic of Korea.ACM,
New York, NY, USA, 11 pages, 2020. https://doi.org/10.1145/3379597.3387474
Avouris, Nikolaos, Sgarbas, Kyriakos, Paliouras, Vassilis, and Koukias, Michalis. Work in
progress: An introduction to computing course using a Python-based experiential
approach. IEEE Global Engineering Education Conference (EDUCON), 2017.
Brand, Isaiah, Roy, Josh, Ray, Aaron, Oberlin, John, and Tellex, Stefanie. PiDrone: An
Autonomous Educational Drone using Raspberry Pi and Python. IEEE/RSJ
International Conference on Intelligent Robots and Systems (IROS), 2018.
Colliau, Taylor, Rogers, Grace, Hughes, Z., and Ozgur, Ceyhun. MatLab vs. Python vs. R.
Business Faculty Publications. 51, 2017.
https://scholar.valpo.edu/cba_fac_pub/51
Docampo, Jorge, Ramos, Sabela, Taboada, Guillermo L., Exposito, Roberto R., Tourino,
Juan, and Doallo, Ramon. Evaluation of Java for General Purpose GPU
Computing. 27th International Conference on Advanced Information Networking
and Applications Workshops, 2013.
Fagan, Bryan J., and Payne, Bryson R. Learn to Program in Python - by Teaching It!.
Proceedings of the Interdisciplinary STEM Teaching and Learning Conference,
Volume 1, Article 9, 2017.

325
QUAESTUS MULTIDISCIPLINARY RESEARCH JOURNAL

Gamua, Elvis. Multi-language APP Development - Java and C++. Centria University of
Applied Sciences, Thesis, 2020.
Girma, Dawit, Yett, Bernard, Hutchins, Nicole, and Biswas, Gautam. Development of a
Python-based Platform for Teaching Computer Science. Young Scientist, A Hight
School Research Journal, 2020.
Hussain, Zahid, and Khan, Muhammad Siyab. Introducing Python Programming for
Engineering Scholars. IJCSNS International Journal of Computer Science and
Network Security, VOL.18 No.12, 2018.
Karnalim, Oscar, and Aldiansyah, Aldi. Python Source Code Plagiarism Attacks in Object-
Oriented Environment. Computer Engineering and Applications Vol. 6, No. 3,
2017.
Khoirom, Selina, Sonia, Moirangthem, Laikhuram, Borishphia, Laishram, Jaeson, and
Singh, Tekcham Davidson. Comparative Analysis of Python and Java for
Beginners. International Research Journal of Engineering and Technology
(IRJET), Volume: 07 Issue: 08, 2020.
Kohn, Tobias. Teaching Python Programming to Novices: Addressing Misconceptions and
Creating a Development Environment. ETH Zurich Research Collection, Doctoral
Thesis, 2017.
Lakshminarayanan, D., and Prabhakaran, S. A Study on Python Programming Language.
Dogo Rangsang Research Journal, Vol-10, Issue-07, No. 12, 2020.
Mahmood, R., and Mahmoud, Q. Evaluation of Static Analysis Tools for Finding
Vulnerabilities in Java and C/C++ Source Code. ArXiv, abs/1805.09040, 2018.
Michael Mutongwa, Sanja, and Abeka, Silvance. A Comparative Study of C, C++, C# and
Java Programming Languages: Underpinning Structure Equation Modeling,
Data Structures and Algorithm. Journal of Scientific and Engineering Research,
2019, 6(12):162-171, 2019.
Moumoutzis, Nektarios, Boukeas, George, Vassilakis, Vassilis, Pappas, Nikos, Xanthaki,
Chara, Maragkoudakis, Ioannis, Deligiannakis, Antonios, and Christodoulakis,
Stavros. Design, Implementation and Evaluation of a Computer Science Teacher
Training Programme for Learning and Teaching of Python Inside and Outside
School. In Auer M., Tsiatsos T. (eds) Interactive Mobile Communication
Technologies and Learning. IMCL 2017. Advances in Intelligent Systems and
Computing, vol 725. Springer, Cham, 2018. https://doi.org/10.1007/978-3-319-
75175-7_56
Olsen, Jan-Fredrik. How to (and why) use Python to teach introductory Calculus. LTHs
10:e Pedagogiska Inspirationskonferens, 2018.
Penha, Dulcinéia, Corrêa, João, Ramos, Luiz, Pousa, Christiane, and Martins, Carlos.
Performance evaluation of programming paradigms and languages using
multithreading on digital image processing. 2005.
Šandrih, Branislava. Informatics for Library and Information Science students with special
focus on Python. Infotheca Vol. 18, No. 1, pp. 61-74, 2018.
Shi, Xiangrong, and Chen, Yuangao. New Teaching Method of Python Programming for
Liberal Arts Students. International Journal of Innovation and Research in
Educational Sciences, Volume 7, Issue 3, 2020.

326
QUAESTUS MULTIDISCIPLINARY RESEARCH JOURNAL

NOTES ON THE AUTHORS


Dejan Viduka was born in Osijek, Croatia in July 30, 1980. Currently he
is an Assistant professor of Computer Science Department at the Faculty for Applied
Management, Economics and Finance, University Business Academy in Novi Sad,
Belgrade, Serbia. Having 23 years of experience at IT sector (hardware, software,
SEO, Internet, e-business, e-marketing, operating systems, CMS systems and Open
Source systems) and extensive experience in the development of Open Source
projects, and is also a member of Elxis Community and provides expert assistance
to customers from Croatia and Serbia. As an IT expert, he worked on many projects
for well-known clients from Serbia and from abroad.
Vladimir Kraguljac was born in 1971 in Kraljevo, Serbia. Since 2015, he
has been hired as an assistant for the narrower scientific field of Information
Technology and Systems at the Faculty of Hotel Management and Tourism in
Vrnjačka Banja, University of Kragujevac. From 2008 to 2015, he gained
pedagogical experience as a professor of computer science at the Gymnasium in
Vrnjačka Banja. Before that, starting from 1993, he worked in a number of
companies where he gained various practical experiences. He is a doctoral student
in the field of Information Technology at the Faculty of Technical Sciences in Čačak.
Areas of interest are related to IT in education - distance learning and e-learning
software, Internet content management systems, primarily for Open Source projects.
He is a member of the International Professional Association - Institute of Electrical
and Electronics Engineers (IEEE).
Boris S. Ličina was born in Bihac, former Yugoslavia, in 1967. Currently
he is an Assistant professor of Computer Science Department at the Faculty for
Applied Management, Economics and Finance, University Business Academy in
Novi Sad, Belgrade, Serbia. He received the B.Sc. degree in electrical engineering
from the University of Novi Sad, Novi Sad, Serbia, in 1993, and the M.Sc. and Ph.D.
degrees from the University of Novi Sad in 2013 and 2020, respectively. From 1993
to 1996 he has been a teaching at Technical High School Mihajlo Pupin in Novi Sad,
the courses involving programming and electrical measurements. From 1996 to 2020
he has been working in Apatin brewery pioneering the introduction of automation
and control equipment in the production process. His current research interests
include programming, A/D conversion techniques, and applications of statistical
signal-processing techniques in the measurement science.

327

You might also like