Introduction to Java Language

About Java:

  • Java is a programming language that has an object-oriented model that means everything in Java is taken as an object.
  • Java is a platform-independent programming language that follows the logic of “Write once, run anywhere”. This is one of the reasons Java is widely used.
  • Java can create complete applications that will run on one computer or are often distributed among servers and clients in a network.
  • The Java language was initiated by James Gosling, Patrick Naughton, and Mike Sheridan at Sun Microsystems in the year 1991.
  • It took the time of 18 months to develop the first version of Java.
  • This language was initially named “Oak” but was renamed “Java” in 1995.

Java Features:

  • Java is a pretty much simple and lightweight language.
  • It is much similar to other programming languages.
  • Java language can be easily extended as it is based on Object Model.
  • It has high performance.
  • It is a secure language. Unlike C language, Java does not expose pointers so that no one can get into the memory location through pointers and is unable to change the content of memory location.
  • It is Robust. It uses strong memory management. There is an automatic garbage collector in Java that runs on Java Virtual Machine (JVM) to get rid of objects automatically which are not getting used by java applications anymore.
  • It is Portable. After compilation, we can run java programs on any platform.
  • It is Dynamic. It has run time polymorphism. So, all objects are evaluated during run time. Not everything is done during the compile time. There is something done during run time as well.
  • It can be Distributed, i.e., we do not have to have all the code into one machine and run it from one machine. From one machine, we could run something written on another machine as well. This is one of the main features why Java is widely utilized in big data.
  • It is multi-threaded, i.e., one of the best facilities provided by Java so that many tasks can be executed at the same time.

Applications of Java:

  • Android Apps-
                      All Android applications are written in the Java programming language. 
  • Server Apps at Financial services Industry-
                      Lots of global Investment banks use Java because it provides a high level of security.
  • Java Web Applications-
                      Many web applications are developed in Java because we have many web servers supporting Java, such as Servlets, JSP, Struts, Spring MVC.
  • Embedded Systems-
                      Many Embedded Systems uses Java because of its lightweight feature.
Java vs C++:

Java

C++

It is an object-oriented language.

It is both object-oriented and procedural.

It is platform independent.

It is platform dependent.

It is portable because it can run on any OS.

As C++ is platform dependent hence, it is not portable.

It is both compiled and interpreted language.

It is only a compiled language.

It does not support multiple inheritance. Hence it uses interfaces to partially achieve it.

It contains both single and multiple inheritances.

It limitedly supports pointers.

It strongly supports pointers.

It does not support call by reference. There is only call by value.

It contains both call by value and call by reference.

It has no virtual keyword.

It has a virtual keyword.

It does not support operator overloading.

It supports operator overloading.

It does not have the goto keyword.

It supports goto keyword.

It does not have structures and unions.

It supports both structures and unions.

Memory management is done automatically using garbage collector.

Memory management is done manually.

It is mainly used for the purpose of application programming.

It is mainly used for the purpose of system programming.

JDK
  • JDK stands for Java Development Kit.
  • Java Development Kit is a superset of JRE.
  • It contains everything that’s within the JRE, plus tools like compilers and debuggers that are necessary for developing applets and applications.
  • JDK is used by developers, but if we want to run the class file, JRE would be sufficient.
                      JDK = JRE + Development Tools
                      JDK = (JVM + Set of libraries + Other additional files) + Development tools
JRE
  • JRE stands for Java Runtime Environment.
  • Java Runtime Environment provides the libraries, the Java Virtual Machine, and other components to run Java applications.
                      JRE = JVM + Set of libraries + Other additional files
  • JRE is only used by end-users.
  • JRE does not contain tools and utilities like compilers or debuggers for developing applets and applications.
  • It provides an environment only to run the Java program.
JVM
  • JVM stands for Java Virtual Machine.
  • JVM is the virtual machine that runs the Java bytecode.
  • The JVM does not understand Java source code. That is why we compile our .java files to obtain .class files, which consist of the bytecodes understood by the JVM.
  • The resultant bytecodes can be run on any machine with the help of JVM, which acts as an interpreter. This makes Java a platform-independent language (Write Once, Run Anywhere).
  • Whenever we want to run the particular bytecode on any of the machines, we just have to have JVM for that particular machine.

Who is the course for?

Prerequisites before starting this course:

Questions 🙵 Answers.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eu orci faucibus orci malesuada semper eget non tellus. Cras sed dignissim purus. Mauris varius neque leo, eu pellentesque justo venenatis et. Sed ultricies risus non turpis tempus, nec  nulla suscipit. In comdo urna eu turpis accumsan, et viverra mauris fringillaCras interdum 

Video 48 Min  + 2 Min read to complete

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eu orci faucibus orci malesuada semper eget non tellus. Cras sed dignissim purus. Mauris varius neque leo, eu pellentesque justo venenatis et. Sed ultricies risus non turpis tempus, nec  nulla suscipit. In comdo urna eu turpis accumsan, et viverra mauris fringillaCras interdum 

Video 48 Min  + 2 Min read to complete

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eu orci faucibus orci malesuada semper eget non tellus. Cras sed dignissim purus. Mauris varius neque leo, eu pellentesque justo venenatis et. Sed ultricies risus non turpis tempus, nec  nulla suscipit. In comdo urna eu turpis accumsan, et viverra mauris fringillaCras interdum 

Video 48 Min  + 2 Min read to complete

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eu orci faucibus orci malesuada semper eget non tellus. Cras sed dignissim purus. Mauris varius neque leo, eu pellentesque justo venenatis et. Sed ultricies risus non turpis tempus, nec  nulla suscipit. In comdo urna eu turpis accumsan, et viverra mauris fringillaCras interdum 

Video 48 Min  + 2 Min read to complete

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eu orci faucibus orci malesuada semper eget non tellus. Cras sed dignissim purus. Mauris varius neque leo, eu pellentesque justo venenatis et. Sed ultricies risus non turpis tempus, nec  nulla suscipit. In comdo urna eu turpis accumsan, et viverra mauris fringillaCras interdum 

Video 48 Min  + 2 Min read to complete

More Courses

You might also be interested in these courses