Friday, 6 October 2017

Explanation of first program of Java

CREATING A SIMPLE JAVA PROGRAM

In this page we try to understand java program, and this helps us lot more in building further java programs.

Class Demo//syantax of creating class(try to discuss more in next classes

{

public static void main( String... args)//this is a new method to create an array and it comes in JDK 1.5.{

System.out.println("Hello friends, this is our first java program");

}

}



EXPALNATION:-
PUBLIC:- Public is an access specifier or access modifier and it tells the JVM that it is visible to all and JVM call this method from anywhere.


STATIC:- Static is a keyword which plays an important role in java main method IT                    tells JVM that their is no need to create object of main method to invoke main method beacuse it is executed by JVM directly so thier is no need to create object.

Void :-  Void is nothing but we knows that void returns nothing.

String... args:- It is an array which is advanced array used only in 1.5 and in upper version of JDK after JDK 1.5.

System.out.println:-Its is simply a print statement .


 Screenshot of first program output:::.




Thursday, 5 October 2017

Compilation and Execution of java program(JVM architecture)

                         
Ø Source Code:- is a code written by a programmer(coder).
Ø Java Compiler(javac):-It compiles code of java and convert it into .class file.
Ø Byte Code Verifier:-Byte Code Verifier is used in JVM(java virtual machine after class loader). It filters code and remove unwanted code from .class file. Hence, it increases the security of java program.
Ø Execute Program:-Os specific JVM creates a space in ram and then several function comes in action like class loader, byte code verifier, Execute Engine etc.
Ø Os Specific “Object code”:-Object code is nothing but machine code.







There are different memory segments .
When a program is loaded into memory it is organized into three areas of memory called segments.All have their different working.



                                                   Thanks Wait for next Content.

Topic.
First Program of java and Explanation.

Monday, 2 October 2017

COMPARISON BETWEEN PPA AND OOPs.


PPA programming approach have several disadvantages. 


                                           

S.no
PARAMETERS
PROCEDURAL PROGRAMMING APPROACH
OBJECT ORIENTED PROGRAMMING
1.
Focus             
It only focuses on procedure like in c language,  cobol and fortan.
It focuses on data or we can say object rather than procedure.
2.
Approach
POP always follow top-down approach.
OOPs follows bottom-up approach like in java and other programming language.
3.
Access Specifiers
Does not have any access models.
It has many types of  access models like java, c++.
4.
Decomposition of code.
Large programs  are divided into functions.
Programs are decomposed into objects.
5.
Data Hiding
Data is not hidden because there is no concept of data abstraction.
Data is hidden.
6.
Security
PPA is not so secured because data is moving openly.
OOPs is secured because data is not moving freely.
7.
Code lengthyness.
Whenever we write a program in PPA code is very very lengthy.
Code is distributed in diffe


Difference Between C C++ and java.



S.NO
PARAMETERS
C
C++
JAVA
1.
Approach
It follows PPA approach.
It also follows PPA approach as well as OOPs.
It follows OOPs only.
2.
Developer and Dateof invention.
Dennis Ritchie,1972
Bjarne Stroustrup,1980.
James Gosling and team,1995.
3.
Language Level
Middle level.
Middle level
High Level
4.
Platform Dependencies
C is platform dependent.
C++ is also platform dependent.
Java is platform independent.
5.
Data Security.
Data is not secured.
Data security is little more than C++.
Java is secured.
6.
Acess specifier
Not present in C.
Present in C++.
Present in java also.
7.
Robustness.
Not much robust.
Because of Exception handling, it is robust.
Because of Exception handling and Automatic garbage collector, it is much robust than any language.


Sunday, 1 October 2017

Starting java

HISTORY OF JAVA



First version released in 1995.


-1.02(1996) JDBC, Distributed objects.


-1.1(1997) New Event model,Generics.


-1.2(1998) Swings, for/in loop.


-1.3(2000) Autoboxing /Unboxing.


-1.4(2002) cleanup,Type safe Enums.


-1.5(2004) Varags.


-1.6(2006) Static import.


-1.7(2011) Annotations.



HISTORY OF YOUNG JAVA




1992- Oak for a PDA on Sparc(*7).


1995-official release of java.


1997-picojava


1999-J2SE,J2EE


1999-JSE has base part and JSEis also called core java.


2000-J2ME.



Java Standard Edition(JSE)




1.J2EE


2.Java with embedded.


3.Java Fx


4.Bio java.



                                                                   

Q-Where java is used and using?

Ans-According to sun 3 billion devices run java.

       
 java is currently used in many ways.

1.Desktop Application such as antivirus,caculators,media player etc.


2.Web applications.


3.Enterprise Application.


4.Mobile applications.


5.Embedded system.


6.Robotics.


7.Games.


Q-Why java is so used ?


Ans-There are many reasons for java is used or we can say many features for using of java but main reason is object  oriented programming and security.

Object oriented programming:-OOPs is an approach in  which different  programs and methods are writtten.


There are three catogories of oops.


1.object based:-A language which does not support two feature of oops like inheritance and run time poly morph ism or dynamic binding.
Ex:-java script,visual basic etc.

2.purely object oriented:-A language in which everything is represented in the form of object.

Example:-small talk.

3.simple object oriented:-A language in which everything is represented in the form of object except primitive datatypes.

Just because of primitive datatpes java is not a pure object oriened lamguage.



Explanation of first program of Java

CREATING A SIMPLE JAVA PROGRAM In this page we try to understand java program, and this helps us lot more in building further java progr...