Wednesday, 11 July 2018

How we can compile and run java file

Morning Everybody

In this article today we are going to learn " How we can compile and run java file ". So let`s get started.


Figure shown below:


How java file is compile and run
How java file is compile and run


First of all we need to download and install JDK then create file with .java extension. After creating file we need to compile this file using javac compiler.


If file has no error then java compile (javac) generate a .class file (byte code) and this class file is machine readable so it run on any platform (OS).


Now JVM load and verify this .class file than JVM is execute .class file and provides run time environment.


Thank you. Have a nice day.

" Be Student , Be Curious "

For more detail watch this video :









Introduction of JDK, JRE and JVM

Morning Everybody

 
In this article today we are going to learn " Introduction of JDK, JRE and JVM ". So let`s get started.




1) JDK:


                                               
JDK stands for “Java Development Kit “. It is used to create and run java application. It contains JRE, interpreter, compiler (javac), Java Archiver (JAR), document generator (javadoc) and some other tools for application development.


To running java applications simply download JRE only. But if we want create and run java application we need to download and install JDK.
     

2) JRE:

 

JRE stands for “Java Runtime Environment “. It is part of the JDK but it also download seperatly.It is a set of software tools to run the java application.
           
It contains JVM (Java Virtual Machine), platform core classes, AWT, Swing, JNDI, JDBC, RMI and other supporting libraries.
            

2) JVM:

       
JVM stands for “Java Virtual Machine “.It is part of the JRE. It is an abstraction layer between Java application and underlying platform (OS).In other word JVM is used to execute the java application.
 


This below figure is shown the brief internal structure of JDK:

jvm , jre , jdk
Internal structure of JDK

 In above figure JDK contains  JRE  and  Development Tools.



1) JRE:

 

JRE is used to run the java applications.It contain two sub components JVM and other files file. JVM is used to interpret the byte code. During interpretation JVM require some other file for executing a byte code.


2) Tools or Development tools:

 

Development tools is use to developing java application. 


Thank you. Have a nice day.


" Be Student , Be Curious "


For more detail watch this video :








Saturday, 7 July 2018

Introduction of packages and access modifier in Java

Morning Everybody

In this article today we are going to learn " Introduction of packages and access modifier in Java ". So let`s get started.

1) Packages:


A package is group of java classes, interfaces and sub packages. There are types of packages.


1) Built-in packages: 

Java provide many built in packages like java, lang, util, sql etc.

2) User Define packages:

User can create own package is call user define package.

2) Access Modifier: 


It defines the accessibility of data member (Variable) and member method (function). There are four types of access modifier in java are as follows:


1) Public: 

If we assign public access modifier to class members than it can access by any class.

2) Default:

If we assign don`t any access modifier to class members than it treated as default. It behaves like public access modifier in same package.

3) protected: 

If we assign protected access modifier to class members than it can access in same class and it`s child class and also use in other package with inheritance.

4) Private:

If we assign private access modifier to class members than it can access by same class public members only.


Thank you. Have a nice day.


" Be Student , Be Curious "


For more detail watch this video :





Monday, 25 June 2018

Introduction of OOP in Java


Morning Everybody

In this article today we are going to learn  "Introduction of Oop in Java ". So let`s get started.

" Object Oriented Programming " (OOP) is a way to create and maintenance the application by providing some rules.

Simula is the first Object Oriented Programming language.

Smalltalk is the first truly OOP language. Truly OOP means all thing is represent with object.

Basic concepts of OOP are:
  1. Class
  2. Object
  3. Inheritance
  4. Encapsulation
  5. Polymorphism
  6. Abstraction

1. Class:

Class is User Define Data Type or class is Collection of Data Member (Variable), Member Method (function) ,constructor, subclass , interface and access modifier.

2. Object:

Object is Runtime Entity or object is instance of class it represents class members (data member  , constructor, subclass , interface and access modifier and member method).  

 

3. Inheritance: 

Inheritance means one class may acquire property and method of other class.

4. Encapsulation:

Encapsulation means wrapping up code and data in single unit.

5. Polymorphism:

Polymorphism is Greek term “poly” means many and “morphism” means form  .In other word one task is perform by different way.

6. Abstraction:

Abstraction means hiding details and showing only functionality. Abstraction is achieved using Abstract Class and Interface.

Thank you.Have a nice day.

" Be Student , Be Curious "

For more detail watch this video :




Saturday, 16 June 2018

Introduction And History of Java

Morning Everybody

In this article today we are going to learn  " Introduction And History of Java ". So let`s get started. First question is that :

What is Java ?


Java is secure , platform independent (OS independent) and Object Orient Programming language (OOP).

 

Introduction and history of Java :


Java was conceived by James Gosling, Patrick Naughton, Chris Warth, Ed Frank, and Mike Sheridan at Sun Microsystems, Inc. in 1991.

Initially Java call " Greentalk " (because it developed by green team ) and file extension is .gt than it call "oak".Oak denotes strength and oak is national tree of many countries.

Than oak was renamed as Java in 1995.

Java is place island of Indonesia where first coffee was Come.Now Java subsidiary of Oracle Corporation.

Initially Java is Developed For digital devices such as set-top boxes, TV and some other device.Now Java is used to create many types of application such as  Desktop application , Web application,  Mobile application, Game application, E-business Application. According to Sun Microsystem Java run 3 billion Device.


Thank you.Have a nice day.

 " Be Student , Be Curious "


For more detail watch this video :