Introduction To Java Programming

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Java is distributed

Using java programming language we can create distributed applications. RMI(Remote Method Invocation) and EJB(Enterprise Java Beans) are used for creating distributed applications in java. In simple words: The java programs can be distributed on more than one systems that are connected to each other using internet connection. Objects on one JVM (java virtual machine) can execute procedures on a remote JVM.

Secure

We don't have pointers and we cannot access out of bound arrays (you get ArrayIndexOutOfBoundsException if you try to do so) in java. That's why several security flaws like stack corruption or buffer overflow is impossible to exploit in Java.

Portable

As discussed above, java code that is written on one machine can run on another machine. The platform independent byte code can be carried to any platform for execution that makes java code portable.

bytecode

As discussed above, javac compiler of JDK compiles the java source code into bytecode so that it can be executed by JVM. The bytecode is saved in a .class file by compiler.

Java is a platform independent language

Compiler(javac) converts source code (.java file) to the byte code(.class file). As mentioned above, JVM executes the bytecode produced by compiler. This byte code can run on any platform such as Windows, Linux, Mac OS etc. Which means a program that is compiled on windows can run on Linux and vice-versa. Each operating system has different JVM, however the output they produce after execution of bytecode is same across all operating systems. That is why we call java as platform independent language.

Java Runtime Environment(JRE)

JRE is a part of JDK which means that JDK includes JRE. When you have JRE installed on your system, you can run a java program however you won't be able to compile it. JRE includes JVM, browser plugins and applets support. When you only need to run a java program on your computer, you would only need JRE.

Simple

Java is considered as one of simple language because it does not have complex features like Operator overloading, Multiple inheritance, pointers and Explicit memory allocation.

Multithreading

Java supports multi threading. Multi threading is a Java feature that allows concurrent execution of two or more parts of a program for maximum utilization of CPU.

Java is an Object Oriented language

Object oriented programming is a way of organizing programs as collection of objects, each of which represents an instance of a class. 4 main concepts of Object Oriented programming are: Abstraction, Encapsulation, Inheritance and Polymorphism

Java Virtual Machine

Phases are as follows: we write the program, then we compile the program and at last we run the program. Writing of the program is of course done by java programmer like you and me. Compilation of program is done by java c compiler, java c is the primary java compiler included in java development kit (JDK). It takes java program as input and generates java byte code as output. In third phase, JVM executes the byte code generated by compiler. This is called program run phase.

Robust Language

Robust means reliable. Java programming language is developed in a way that puts a lot of emphasis on early checking for possible errors, that's why java compiler is able to detect errors that are not easy to detect in other programming languages. The main features of java that makes it robust are garbage collection, Exception Handling and memory allocation.

Java Development Kit(JDK)

While explaining JVM and bytecode, I have used the term JDK. Let's discuss about it. As the name suggests this is complete java development kit that includes JRE (Java Runtime Environment), compilers and various tools like JavaDoc, Java debugger etc. In order to create, compile and run Java program you would need JDK installed on your computer.


Ensembles d'études connexes

APUSH ch 13 and 14 pre/post test, exam

View Set

Pharm Ch 24 - Natural/Herbal Products and Dietary Supplements, CHAPTER 24 (Natural/Herbal Products and Dietary Supplements)

View Set

Week 12: Neuron Structure and Function

View Set

Quality Engineering: Final Review

View Set

Tema 1: Agua (Quimica Alimentos)

View Set

Principles of Macroeconomic Ch. 6

View Set

Testicular/Prostate Anatomy & Physiology

View Set

EXAM FX Life: Types of Insurance Policies

View Set