Black Book Blac Learn Java TM In a Week A Beginners Guide to Java Programming Mahavir DS Rathore
Books by Mahavir DS Rathore
- Java 8 Exception Handling
- Java 8 Exception Handling Quiz
Copyright Learn Java TM 8 in a Week is by Mahavir DS Rathore. While every precaution has been taken in the preparation of this book the author assume No responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. About the author I have been programming and teaching Java for last 18 years. This book is an effort to document my knowledge to share with everyone across the world. I am available to do training on Java anywhere in the world. My email id is gurumahaveer@gmail.com.
Who should read the book? This book is for programmers who already know some programming language and are keen to learn Java. Software Required Java 8 (JDK 1.8) and Notepad++ editor. Acknowledgement Java is owned by Oracle and trademark is acknowledged. Dedication To my Guru Shri Amrite. Source Code For source code of this book please send me a mail at . Feedback Please share your feedback which will help me to improve this book.
Table of Content
Sl.No | Chapter | HyperLink |
| What is Java? |
| JDK and JRE |
| Setting Path Variable |
| Complier and Interpreter |
| The First Program |
| The HelloWorld Program |
| Anatomy of HelloWorld Program |
| Multiple Main Methods |
| Public Class and File Name |
| Runtime Execution |
| Alternate HelloWorld Program |
| Numeric Data Types |
| Non Numeric Data Types |
| Literal and Constant |
| Escape Sequence |
| Immutable String |
| StringBuilder Class |
| Wrapper Classes |
| If... Else |
| Switch... Case |
| For... Loop |
| While... Loop |
| Break and Continue |
| Conversion and Casting |
| Arithmetic and Relational Operators |
| Logical and Ternary Operators |
| Arrays |
| Jagged Array |
| For Each Loop |
Chapter 1 What is Java? Topics Introduction Java as Software Platform Java as Programming Language Languages That Influenced Java Languages Influenced by Java Summary Introduction The current (Latest) version of Java is 8.
- Software Platform.
- Programming Language.
Java as Software Platform Java platform is a collection of software components which allow development and execution of bytecode based languages.
- Software Platform.
- Programming Language.
Java as Software Platform Java platform is a collection of software components which allow development and execution of bytecode based languages.
Bytecode is binary code that Java platform interpret. The Java platform is composed of
- Compiler It generate bytecode from source code
- Java Virtual Machine It provide runtime execution environment for bytecode.
- Libraries It contain Java API.
- Tools Various Java Tools.
The Java bytecode has two important characteristics
- It is processor independent i.e. the program can run on any processor architecture.
- It is Operating System independent i.e. bytecode does not target any Operating System such as Windows or Linux.
The Java platform is available in four flavors based upon device type.
- Java Card It is used in smart cards and small memory devices.
- Java ME (Micro Edition) It is used in Personnel Digital Assistants, Setup Box and printers application.
- Java SE (Standard Edition) It is used in development of desktop, communication and User Interface based applications.
- Java EE (Enterprise Edition) It is used in development of web based, messaging, distributed and enterprise applications.
The Java Platform has support for many languages such as
- Java
- Jython
- Jruby
- Scala
- Groovy
- Rakudo Perl 6
- Kotlin
Java as Programming Language Java is multi paradigm programming language. It is one of the most used programming language for development of various types of software such as desktop, enterprise, web based and mobile applications.
Some of important attributes of Java Language are
- Statically typed The type of the variable is known at compile time.
- Object oriented Object centered programming.
- Concurrent Support for multithreading programming.
- Reflective Allows inspection of class, method, interface, fields.
Languages That Influenced Java Java language falls in C family of language category. It has taken inspiration from many languages including languages which were released after Java. Some of the major languages that have influenced Java are:
- C++
- Oberon
- Ada 83
- C#
- Object Pascal
Languages Influenced by Java As per tiobe index Java is the No.1 Programming language today. Java has influenced many Modern languages such as:
- C#
- Clojure
- Python
- JavaScript
- PHP
- Scala
- Groovy
Summary Java is a programming language and a platform. Java platform is divided into 4 parts SE, ME, EE and Card.
Chapter 2 Java Development Kit and Java Runtime Engine Topics Introduction Java Runtime Engine Java Development Kit Installing JDK Installing Notepad++ Summary Introduction The minimum environment required for a java program to run is called JRE (Java Runtime Engine).
Chapter 2 Java Development Kit and Java Runtime Engine Topics Introduction Java Runtime Engine Java Development Kit Installing JDK Installing Notepad++ Summary Introduction The minimum environment required for a java program to run is called JRE (Java Runtime Engine).
JDK is the minimum environment required for development of Java Applications. Java Runtime Engine (JRE) It is an environment that is required for executing a java application. A very popular usage of JRE is with a browser where it is available as a plugin to allow applet (client side program) to execute. JRE is composed of following components:
- Interpreter: It understand binary java code (e.g.: java.exe).
- Tools: They provide various functionality such as security, core services, internationalization, RMI etc.
(e.g.: keytool, rmiregistry, javacpl etc) c. Library: Java Application Programming Interface (rt.jar, jce.jar, jsse.jar etc.) JRE cannot be used for development of Java application but it is used for executing them. Java Development Kit (JDK) It is an environment that is targeted for developers who desire to develop Java applications.
JDK is nothing but Java Standard Edition which is used for development of desktop, user interface, communication and applet types of applications. JDK is composed of following components:
- Compiler: It is used to compile java code to bytecode (e.g Javac.exe).
- Interpreter: It processes bytecode to native code (e.g. java.exe).
Next page