Java tutorial


1.James Gosling initiated Java language project in June 1991
2.JAVA is a programming language and computing platform first released by Sun Microsystems in 1995.
3.There are lots of applications and websites that will not work unless you have Java installed, and more are created every day.
4.Java is fast, secure, and reliable.
5.From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!

Why JAVA is secure language?
JVM is an interpreter which is installed in each client machine that is updated with latest security updates by internet . When this byte codes are executed , the JVM can take care of the security. So,Java is said to be more secure than other programming languages.

Why java is reliable ?
Java is reliable because it’s portable- You can compile the source code once and then distribute it across multiple Operating Systems.

Java First print hello world programme….

class Hello
public static void main(String[] args)
System.out.println(” hello world”);

output : hello world

How to run and compile JAVA program ?
Java JDK Should be installed on your computer system.
Notepad or any other text editor

There is many software that provides best way to write and compile the java program such as eclipse, net beans etc.

Set variable path
Select Start -> Computer -> System Properties -> Advanced system settings -> Environment Variables -> System variables -> PATH.

[ In Vista, select Start -> My Computer -> Properties -> Advanced -> Environment Variables -> System variables -> PATH. ]

[ In Windows XP, Select Start -> Control Panel -> System -> Advanced -> Environment Variables -> System variables -> PATH. ]

Prepend C:\Program Files\Java\jdk1.6.0_27\bin; to the beginning of the PATH variable.
Click OK three times.

1. A Java programme should be written within a class
2. class is predefined keyword in Java
3. To declare a class in Java we use class keyword followed by class name
4. Syntax : class Hello here hello is a class name
5. To get output from the programme we use output function that is
System.out.println(” hello world”);