We have to first understand JAVA before start learning. JAVA IS A PURE OBJECT-ORIENTED PROGRAMMING LANGUAGE. In this blog, I will focus only on main points, rest of story would be available on the web.
Brief Introduction to Java
- JAVA was initially developed by Sun Microsystems Inc in 1991, later acquired by Oracle Corporation.
- Writing, compiling and debugging a program is easy in Java.
- It helps to create modular programs and reusable code.
- Java is open source programming language.
- Compile Once and Run Forever
Architecture of JDK(Java Development Kit)
- Basic Java – 1 || Understand Java before start learning JAVA.
- Basic Java – 2 || Variables and Data Types used in JAVA.
- Basic Java – 3 || Understanding Class, Objects, Methods in Java.
- Basic Java – 4 || More on methods(Return Type and Parameters)
- Basic Java – 5 || Methods- Call by Value and Call by Reference in Java.
- Basic Java – 6 || Understanding of Constructor and Destructor in JAVA.
- Basic Java – 7 || Static Variables and Methods.
- Basic Java – 8 || Lets learn about Arrays in Java.
- Basic Java – 9 || Performing multiple operations using Java Operators.
- Basic Java – 10 || Conditions (If and Switch) in JAVA.
- Basic Java – 11 || for and for-each in Java. (Loops Part-1)
- Basic Java – 12 || Alternate looping concepts while and do-while. (Loops Part-2)
- Basic Java – 13 || Decimal values v/s Octal base(8) values in JAVA.
- Basic Java – 14 || Difference between IndexOf() and lastIndexOf() methods of Strings in JAVA.
- Basic Java – 15 || Runtime User Input using Scanner Class (Part-1).
- Basic Java – 16 || Runtime User Input using BufferedReader Class (Part-2).
- Basic Java – 17 || Runtime User Input using Console Class (Part-3).
- Basic Java – 18 || Difference between break and continue keywords.
- Basic Java – 19 || Sending Email using Java (Part-1).
- Basic Java – 20 || Sending Email with attachment using Java (Part-2).
- QnA | Difference between Integer and int keywords.
- QnA | Can main method be overloaded?
- QnA | How do I reverse a String/Sentence in Java?
- QnA | Perform Multiplication and Division without * or / or % operators.
- QnA | How do I get the default value of data type?
- QnA | How to split String if it contains period symbol (.) in between?
A simple process of running a java program
- First of all, write an input program and save it with name “Test.java”.
- Now Compile the program which converts Test.java file into “Test.class”.
- A class file is a bytecode file which contains commands in binary form.
- Now Execute the bytecode which will convert bytecode to Machine Level Language.
- This Machine Level Language instructs the Operating system to execute a command written in ‘Test.java’ file and generates Output.
JVM(Java Virtual Machine) provides a secured sandboxed environment which executes the bytecode and instruction have been given to the Operating system.
JRE(Java Runtime Environment) is the combination of JVM and Java class library files which implements the JVM to execute bytecode on a machine.
JDK(Java Development Kit) provides entire suite to create a project via any development tool, compile a program, and JRE.
Features of Java
1. Platform Independent Programming language. This can be achieved by creating a runnable jar file of java programs.This jar file can be run on multiple machines which supports JVM/JDK/JRE.
Note that programming language is platform independent but JVM/JDK/JRE are platform dependent. There are multiple versions of JVM/JDK/JRE depending upon the OS(MAC/Windows/Linux) 64-bit, 32-bit.
2. Pure Object Oriented Programming language as it supports Abstraction, Encapsulation, Inheritance, Polymorphism
3. Simple language because it does not have complex features like Operator overloading, Multiple inheritances, pointers and Explicit memory allocation.
4. Robust Language as it handles both Memory Management Mistakes and Runtime Errors.
Memory Management Mistakes overcome by Garbage Collection(Automatic allocation and deallocation of memory when objects not in use.)
Runtime Errors: By exception handling procedures.
5. Secure: JVM provides a virtual environment to run java programs in a secured sandbox.
6. Distributed: Objects on one JVM (java virtual machine) can execute procedures on a remote JVM.
7. Multithreading: Can perform multiple tasks simultaneously.
3017total visits,1visits today