Introduction to Java

Introduction to Java

Basic introduction to java, its architecture, advantages and applications.

ยท

3 min read

What and Why Java?

Java is a high-level, object-oriented programming language developed in 1995 by a team of engineers at sun microsystems. It was developed majorly to support networking devices and embedded systems, and today java has vast applications in Networking and IOT stuff.

It is open-source and based on C/C++ like syntax, so if you are someone who knows C/C++, java is going to be easy.

Java is now owned and maintained by Oracle and according to oracle, more than 3 billion devices worldwide run java.

if you are more interested in java and its story you can watch/listen to a podcast with the creator of java James Gosling here.

Java Architecture

The components known as JVM, JDK and JRE combine to form the architecture of the language. The Java Architecture describes each step in the compilation and execution of a program

The human-readable file or your code (.java file) is compiled into bytecode (.class file) by the compiler and finally, the byte code is converted into machine code (0's & 1's) by an interpreter.

Components of Java Architecture

Java Development Kit ( JDK )

  • provides an environment to develop and run java programs.

  • it is a package that contains JRE, JVM, development tools etc.

Java Runtime Environment ( JRE )

  • it is a package that only provides an environment to run java programs.

  • it contains user interface tools, base libraries, deployment tech and JVM.

Java Virtual Machine ( JVM )

  • converts byte code into machine code.

  • it is an interpreter.

  • line-by-line execution.

Just In Time ( JIT )

  • a part of JVM

  • makes execution faster

  • provides direct machine code for repeating code

Advantages of Java

  • Object Oriented ( OOPS )

Everything in java is an object, what OOPS does is make our program easier to develop, debug and maintain.

  • Portable and platform independent

WORA stands for Write Once Run Anywhere. java follows this and it is what makes it portable because you just have to write it once and now you can run it anywhere on any device as long as it has a java interpreter. byte code is what makes java platform independent and portable.

  • Secure

Java is a secure language that ensures that programs cannot gain access to memory locations without authorization.

  • Robust

Java is a robust programming language since it uses strong memory management. We can also handle exceptions through the Java code.

Applications of Java

  • Mobile Applications ( Android )

  • Desktop Applications

  • Web Applications

  • Web Servers

  • Gaming Applications

  • Distributed Systems

  • Cloud-Based Applications

  • Minecraft Mod-Development

Conclusion

Java is a pretty good language to start with or learn for any of the above specific applications depending on your interests. Or you can learn it and start improving your DSA Skills if you are not a big fan of C / C++ like me.

Thank you for reading this blog. This was part one of the Java Programming language Series. More parts will be published soon. Feel free to comment and give suggestions/feedback, Share with your friends if you liked this and I will see you in the next one.

Did you find this article valuable?

Support Yash Dhasmana by becoming a sponsor. Any amount is appreciated!

ย