Introduction to Java

Java is object oriented and platform independent programming language which runs upon JVM. If you are newbie with programming then you will have following questions:

  • What is programming?
  • What is platform independent and JVM ?
  • What is object oriented programming?
  • What is object?

Program is collection of statements which preform any task on machine. Programming languages are human readable. These are compiled by compilers to convert into assembly language which is readable by machine. Java runs upon Java Virtual Machine (JVM). It is a virtual environment and similar to .NET platform. Due to JVM, java does not depends on operating system like C and C++. It can run on any platform (linux, windows, mac, etc. ). Object oriented programming is object based programming. Everything is an object. You can take any conceptual component in the problem you’re trying to solve (house, table, chair, etc.) and represent it as an object in your program. In a program there are a lot of objects which tell each other what to do by sending messages. Each object has its own memory.

Why Java?

  • Object Oriented: Java is most object oriented.
  • Platform independent: It runs on JVM.
  • Simple:Java is designed to be easy to learn. Its syntax is similar to C and C++.
  • Secure: Java enables to develop tamper-free andvirus-free systems. Authentication techniques are based on public-key encryption.
  • Architectural-neutral: Java compiler generates an architecture-neutral object file format, which makes the compiled code to be executable on many processors, with the presence of Java runtime system.
  • Portable: Compiler in Java is written in ANSI C with a clean portability boundary which is a POSIX subset.
  • Multithreaded: It is possible to write programs that can do many tasks simultaneously.

Prerequisites:

1) Install Java

2) Install Java IDE like ecllipse ( eclipse is free)

Install Java:

On windows:

Install from here:

On Linux:

Use the commands in terminal:

  1. sudo apt-get install openjdk-7-jdk

Install Eclipse:

On windows download eclipse for developers from here: https://www.eclipse.org/downloads/ and install

On linux use these commands:

First download eclipse for developers from here: https://www.eclipse.org/downloads/?osType=linux

Then give these commands from the folder where you have download ecllipse:

  1. sudo mv eclipse-java-luna-SR2-linux-gtk-x86_64.tar.gz /opt/
  2. cd /opt
  3. sudo tar -xvf eclipse-java-luna-SR2-linux-gtk-x86_64.tar.gz
  4. cd /usr/share/applications/
  5. sudo nano eclipse.desktop

In this file (which is open in terminal after nano command) write this code and save using ctrl+o and exit using ctrl+x.

  1. Name=Eclipse
  2. Type=Application
  3. Exec=/opt/eclipse/eclipse
  4. Terminal=false
  5. Icon=/opt/eclipse/icon.xpm
  6. Comment=Integrated Development Environment
  7. NoDisplay=false
  8. Categories=Development;IDE;
  9. Name[en]=eclipse.desktop
  10. X-Desktop-File-Install-Version=0.22

Now write these commands:

  1. sudo desktop-file-install /usr/share/applications/eclipse.desktop
  2. sudo ln -s /opt/eclipse/eclipse /usr/local/bin/



ReactJS with Redux Online Training by Edureka

About Harish Kumar

Harish, a fullstack developer at www.lyflink.com with five year experience in full stack web and mobile development, spends most of his time on coding, reading, analysing and curiously following businesses environments. He is a non-graduate alumni from IIT Roorkee, Computer Science and frequently writes on both technical and non-technical topics.

Related Articles

PHP stands for PHP: Hypertext Preprocessor. PHP is known as a server side scripting and interpreter language for web ...
Introduction to PHP
In this tutorial, we will study about conditional statements (if else statements and switch statements). These statem...
Conditional statements in php
In this tutorial, we will study about strings and operations upon strings. Due to long length of this section, I have...
Strings in PHP (part-1)

Complete Python Bootcamp: Go from zero to hero in Python 3

Top Posts

Recent Posts

The Complete Web Developer Course - Build 25 Websites

Meet on Twitter

Subscribe

Subscribe now and get weekly updates directly in your inbox!

Any Course on Udemy in $6 (INR 455)

Development Category (English)300x250

Best Udemy Courses

PHP with Laravel for beginners - Become a Master in Laravel