Java Expectations Vs Reality- Everything You Need To Know | Codecondo

Simon
7 min readJul 13, 2020

The Java programming language was developed by James Gosling and his colleagues when they were working at Sun Microsystems, in the early 1990s. It is an object-oriented programming language. It shares its syntax with C. Although, the Java compiler is written in Java, the JRE (Java Runtime Environment) has been written in C.

The objective of this article is to weigh the expectations and reality of the Java programming language. No matter how strong languages, it has its limitations. No matter how popular it is, it has its detractors. After all, there is a reason why there are so many programming languages. In fact, there are so many programming languages with almost the same syntax as Java.

Why is Java popular among programmers?

One of the biggest reasons why Java is popular among programmers is that the programs written in Java can be run on a single computer as well as on distributed networks and servers. Consequently, from simple to higher-end mobile apps can be built in Java. The same applications can also work like desktop applications. Aside from that, Java applications can be run on all operating systems provided Java runtime environment is installed. This makes it platform-independent. The Java runtime environment can be installed on Windows, Apple computers, and Linux computers.

Most of the Android apps that you use on your mobile phone have been built with Java.

Are you planning on building a career as a Java programmer ? Are you wondering whether you should take up Java programming as a learner? What are the pros and cons? How do you compare the expectations and reality of Java programming?

Frankly, there is no harm in learning Java programming even if later you choose to program in another language. Once you are familiar with the Java programming syntax, you can work in multiple languages including C/C++, JavaScript, PHP, Perl, and a hoard of other languages. Java has a universal syntax in its category of languages.

Another point you must keep in mind is that programming is a style of the problem- solving thinking. Once you have developed that thinking, once you know how to think up logic, you can program in pre y much any language after learning it for a couple of weeks. No ma er what expectations and what reality the Java programming language comes with, there is no harm in learning the language.

Why it still makes sense to learn Java in 2020?

Java is undoubtedly one of the oldest programming languages currently being used. When there are a plethora of languages to learn, why should you learn Java?

Java is one of the original programming languages. It covers pretty much every major syntax being used in every major contemporary programming language. This is one reason why you shouldn’t shrug away from learning Java.

The second reason is, Java isn’t going anywhere. As we have mentioned above, practically all Android mobile apps are being written in Java. Hence, if you want to make a career out of building mobile apps, then you should definitely learn how to program in Java.

The third reason is, it is timeless. No ma er how many new versions of the Java programming language are released, the fundamental code remains the same. This is because all in all, there are 51 keywords in Java and just two of them are not in use. The rest of the language capabilities come from hundreds of thousands of libraries that have been written by different programmers all over the world. So, the core functionalities of the Java programming language never changes, and they are never deprecated.

This write-up is about giving you an objective take on the Java programming language in terms of what are the expectations when people start learning Java, and what are its limitations, what is the reality? No, when we talk of reality it doesn’t mean that there is something really wrong with Java that must be exposed. No, this is not the case. Every language worth its salt has its pros and cons. There are always advantages and disadvantages of learning a certain language and so is the case with Java.

Listed below are some advantages of using or learning the Java programming language.

Advantages of the Java programming language

  • With just 51 keywords, Java is known to be a simple programming language. It is designed to be used in an easy manner. It is not just easier to learn it, it is also easier to debug it.
  • Although its syntax is similar to C and C++, again, comparatively, it is simpler than these languages. It has automatic memory allocation and garbage collection whereas, in C and C++, a programmer needs to do extra programming to allocate memory and collect garbage.
  • Then of course there is object-oriented programming. You create objects and you manipulate data through the objects. Whatever happens, happens inside the objects. This makes the programs modular and you’re also able to reuse the objects in other programs without disturbing the original code.
  • Whenever there is a Java runtime environment, you can run Java programs. This enables you to run Java programs on different operative systems, mobile environments, and on the web. Java is platform-independent both at source and binary levels.
  • Java is an interpreter based program. This may seem like a disadvantage because with the compiler you can create EXE files and with the interpreter, you always need an interpreter to run the programs, but the advantage is, wherever there is an interpreter, you can run Java programs. The Java programs are compiled into a Java Virtual Machine code called bytecode. Once the bytecode has been generated, the Java program can be run anywhere. The problem with other languages is that for every individual operaøng system, you have to create different applications.
  • Java programs are highly secure. Every aspect of programming in Java including the programming part, the compiler, the interpreter, and the runtime environment has all the cutting-edge security features built into them.
  • Java makes distributed computing seamless. With the advent of cloud-based applications and multiservice programming, it is important for many programs to be able to run on multiple machines but as a single unit. This can be achieved with Java programs. This is precisely the reason why Java programs are so prevalent for web-based applications.
  • Multithreading isn’t an integral part of Java programs. It means multiple tasks can be executed in a Java program simultaneously. This is especially important for visual and network programming.

Disadvantages of using Java

Sometimes, some advantages can themselves turn into disadvantages, although, it differs from situation to situation.

Listed below are some disadvantages of using Java programming although, you will notice that many of the so-called disadvantages have been listed as advantages above. Anyway, these are

  • Garbage collection: Remember that above we have mentioned that whereas in other languages, you need to do extra coding for garbage collection (the unnecessary data and variables that are generated while the program is being executed) in Java programming, garbage collection is taken care of by Java itself. It means, it is up to Java to decide when garbage collection takes place and the problem is, when garbage collection is taking place, all other processes are stopped. Consequently, sometimes, Java programs become very slow when they are running. This is one of the biggest problems faced by people were using Java programs are Java applications.
  • No low-level programming: Low-level programming is needed when you’re writing machine-specific programs and since Java encourages you to write machine-independent programs (this is why you use JRE), low-level programming is not possible with Java’s core capabilities. Although there are many extensions and libraries in Java that you can use to write low-level programming, it is not recommended. Another reason why low-level programming is not possible in Java is it does not have pointers. Pointers are needed to access low-level memory. This may also be a problem when you are writing applications for the Internet of Things-enabled gadgets and appliances because many of these gadgets and appliances depend on embedded programming which is normally low-level programming.
  • More memory: Java programs need the Java runtime environment to run. This means the user needs to install the Java runtime environment if he or she wants to use Java programs. It may seem like an advantage because it means a single program can be run on multiple operating systems as long as there is a Java runtime environment installed, it also requires extra memory to run the JRE. This may make the programs run slow because lots of RAM is being used by the JRE.
  • Cost and performance: Java programs don’t run directly. They need a runtime environment. This makes them comparatively slow. And since memory and processing requirements are higher, indirectly, the hardware costs are increased.

Should you learn Java programming?

Frankly, this question can be asked of any programming language. Java is extensively used. According to Oracle, which acquired Sun Microsystems, which built Java, the programs made with Java are being used on more than 1 billion devices worldwide. Java is popular because once you have built an application in

Java can run on any operating system environment. It is simple to learn compared to other languages. It uses real language words instead of cryptic words.

The Android ecosystem controls over 85% of the market. The Android operative system is majorly based on Java. Most Android mobile app developers working Java. Popular mobile app development kits like Kotlin and Android Studio prefer Java over other programming languages. Hence, if you see yourself working as a mobile app developer, you should definitely learn Java. Another reason for learning Java is, it makes your fundamentals strong. Once you have learnt Java, once you know how to build applications in Java, you can work with pre y much any language.

Read More: 10 Free Resources to Learn Java for Beginners

Originally published at https://codecondo.com on July 13, 2020.

--

--