Loading

Java Tutorial Hub

Training & Tutorials for Java Beginners

Java Tutorial 1 - What is Java Platform?

This video introduces the Java platform , and explains why Java is a platform as well a programming language

 

 

 

Please be patient . Video will load in some time. If you still face issue viewing video click here

points to remember about Java


1) Java is a programming language as well as a Platform.

2) Machine code is the sequences of binary 1 & 0's that the processor understands.

 

Video Transcript

  • Before we introduce the Java platform How about answering a very basic question . What is a PC ?
  • Well , a dictionary definition is a A Computer is an Electronic Device capable of performing computations.It is has many peripherals like a monitor and keyword to accept or display data to user and memory to store information
  • But the heart of the computer is its processor , which does all the thinking for the computer.
    In fact any device with a processor can be called a computer
  • You may have notice the Keyword Electronic in the entire description. If so . how can it understand and display text , images , videos. And other rich media information
  • Well a computer understands only electronic signals where a , 5 volt current represents a binary 1 and a o volt current represents a binary 0
  • Your PC is continually bombarded with these electronic pulses which it interprets 8 bits of such signals are grouped together and text , numerical , symbols are identified by unique pattern of electric pulses.A symbol # is represented by 11111010.Instruction to ADD two numbers is represented by 10000011
  • This is 8-bit computing.Current day processors are capable of understanding and decoding 64 bits at a time
  • Suppose you are asked to write a program to ADD two numbers.Say add 1 with 2
  • Assembly Language is the most elementary form of software development languages
  • Your code to add two numbers in this language would like
  • Store number 1 at memory location say A
  • Store number 2 at memory location say B
  • Add contents of Location A & B
  • Store Results
  • The way you feed this code to the processor would depend on the PC you are using back in 1950's when computers were huge and consumed great deal of power
  • You would convert your Assembly languages code into corresponding machine code of 1 and zeros using mapping sheets and punch the machine code into PUNCH cards and feed to the computer
  • With advancement in technology i/o devices were invented you could directly type your program into the PC using a program called Assembler convert it into corresponding machine code and feed to your processor
  • That apart , you will also have to make calls to creating Operating System provided functions to display output of code.
  • With advancement in software development languages This entire assembly code , could shrink into just one line print f 1+2
    A software called compiler is used to convert your c language code into assembly code and the assembler converts it into corresponding machine code
  • Though present day compilers come bundled with assembler can directly convert your higher language code into machine code.
  • Now, suppose Windows operating system is running on this Intel processor Combination of Operating System plus the processor is called the platform
  • The most common platform in the world is the Windows and Intel called the Wintel Platform.The other popular platforms are AMD and Linux , Power PC and Mac OS X
  • Now, with change in processor , the assembly instructions will change For example the add instruction in Intel may be called ADDITION for AMD , or Math ADD for Power PC ,and obviously with change in Operating System , the level and nature OS level calls will also change
  • As a developer I want my software program to work on all platforms available ,to maximize my revenues. So I would have to buy separate compilers which convert my print f command into the native machine code.But compilers come expensive and there is a chance of capability issues.
  • Enter Java language.
  • The code to display addition of two numbers is System dot out dot print ln 1 + 2 saved as .java file. Using the java compiler the code is converted into a intermediate code called the bytecode . The output is a .class file
  • This code is not understood by any platform but only a virtual platform called the Java Virtual Machine
  • This Virtual Machine resides in the RAM of your operating system
  • When the Virtual Machine is fed with this bytecode it identifies the platform it is working on
    and converts the bytecode into the native machine code
  • In fact while working on your PC or browsing a web whenever you see either of these icons be assured the java virtual machine is loaded in your ram
  • But what makes java lucrative is that code once compiled can run not only on all PC platforms
    but also mobiles or other electronic gadgets supporting java
  • Hence , java is a language as well as a platform (JVM)

 

                                                      Back to Java Tutorials Index Page

 
 
Joomla 1.5 Templates by Joomlashack