What is java??

What is java??
 
Java is a programming language used by millions of devices across the globe.The java was initially named "Oak",then changed it to java.

Developed by james gosling of sun microsystems  in 1991 and now owned by Oracle inc.






Java features in brief:
  • General purpose,high level programming language.
  • Pure object oriented programming language(We cannot make a java program without creating class,the name of the source file must be same as the class name)
  • Platform independent
  • Robust
  • Both Compiled and interpreted.
  • Supports all Oops features like inheritance,polymorphism,encapsulation,data abstraction and hiding,message passing.
  • Automatic garbage collection
  • Has a virtual machine called Java Virtual Machine(JVM),that has ability to interpret java byte code and execute at the runtime.
What java can do??
  • With java you can make strong computer applications,web-sites with an ease.
  • You can make online games,interactive websites,create chat application anything useful your mind thinks off.
  • Java is platform independent,thus every machine that has java installed can run java based applications(Microsoft windows,UNIX,mackintosh OS).
  • There are various devices that uses java that includes java card(Embedded card that uses java),TV remotes,mobile phones(including the new smart phones).
  • Android OS apps are usually made in java platform.
Why learn Java??
The most important question is why you want to learn java language or why you need it.
  • Java is easy to learn:unlike other languages,java has a low learning path and can be understandable to a beginner programmer.
  • Java has a rich API:What is API firstly,API is Application programming interface that has tons of handy functions and variables that a programmer might need.So you don't have to write the code from scratch,just import the thing you want.
  • Java is secure and does not allow data to be accessed and misused easily.
  • There is a lot of IT companies that requires a java professional and pays him a good money. 
How to learn java??
  • Follow this blog obviously. 
  • Watch java tutorials on youtube(there's a guy whose youtube channel name is thenewboston,teaches java to the deep).
  • If you want to learn java from the bottom,buy this book:Head first java(2nd edition) by sierra and bates.Linkflipkart link
  • Go to the official oracle webpage and explore the API.Link:java SE 7 API.
  • Follow other blogs related to java.
  • Implement the java programs actually in the system.
  • Learn by changing the values and see the output,see how it works.
How to start implement java??
  1. Download the latest java(currently java SE RE 7 update 51)Link:download java here.
  2. Click agree and start download.Download must be starting in your browser.
  3. When download completes install java in your system drive(recommended) mostly c drive on most windows systems.
  4. Click next,next installation completes.
  5. Set the path for java jdk in windows->Click windows icon on bottom left->click my computer->right click->click properties->Choose advance system setting on left->choose environment variables->click new->type "path" in variable name and "C:\Program Files\Java\jdk1.7.0_51\bin on variable value.
  6. To check java is successfully installed.Run cmd,click windows button+r->type cmd then enter->type javac then enter->there will be many options displayed on the screen if java is installed otherwise not.This is the screenshot of the command.

Done!!Java successfully installed.

What is JVM??

Before starting java programming we must learn what JVM is.JVM or so called "Java virtual machine" is not a machine that DO NOT EXIST on its own or physically but is a computer program itself that is responsible for converting the java source file,i.e,.java file to an intresting file called .class file after compiling the program.
        This .class file contains code called bytecode which is similiar to every machine.

Byte code:Byte code is a balanced code containing the symbols that is only understandable to the JVM.

This is how the execution of java program works

  1. The java command "javac filename.java" gives the instruction to the JVM to convert .java file to a .class file containing the bytecode.Also called complilation process.
  2. The command "java filename" tells JVM to execute the given .class file and give the output.
A schematic diagram to show how java execution works.





Comments

Popular posts from this blog

Four building blocks of Object oriented programming language

Exceptions and exceptional handling

Lists in java