Monday, January 24, 2011

CH-1] Introduction to JAVA

A] History of JAVA



  1. It was developed by Sun Microsystems, Inc. in 1991.

  2. In 1991, a small group of Sun engineers called the "Green Team" developed java. Led by James Gosling, the team worked around the clock and created the programming language that revolutionizes our world .

  3. In 1995, the Netscape Navigator internet browser incorporate java technology

  4. Presently java is everywhere [:)]


B] Introduction



  1. Java is an Object-oriented programming language.

  2. It has also become widely used programming language for the internet

  3. Java language is used to develop following types of Applications:
    a] Standalone Applications:It includes programs that run on your computer.They generally run on console.
    b] Applets:An applet is a java program which is designed to travel over the internet and to be executed on the client machine by a java-compatible web browser like internet explorer or Netscape
    c] Web Applications:These applications run on the web server(Example:Java Servlets,JSP)
    d] Distributed Applications:Java applications can be divided into number of modules/components which can run on different machines


Important features of JAVA are:



  1. Simple and familiar

  2. Secure

  3. Platform independent and portable

  4. Object-Oriented

  5. Memory Management and garbage collection

  6. Multi-threaded

  7. Robust

  8. Distributed

  9. Dynamic

CONTENTS

Here is the road map for our journey:


1. Introduction to JAVA
2. Language Fundamentals
3. Operators,expressions and Assignments
4. Control Statements
5. Object Oriented programming Fundamentals
6. Class Fundamentals
7. Inheritance
8. Packages
9. Interface
10. Exception Handling mechanism
11. Modifiers
12. String and StringBuffer class
13. java.lang.Object class
14. Wrapper class
15. Multi-Threaded programming
16. Collections Framework
17. Input/Output in java
18. Applet
19. AWT Fundamentals and Applications

Sunday, January 23, 2011

Welcome to java curb

Hello friends..The main objective of this blog is to keep u update regarding java coding...
I will try to give answers off all our questions and will try to do all sorts of java related coding here..
So herez my first step..
NOTE: This is a begginners tutorial for learning java..
Step 1:
Install java with latest version..I am using JDK 1.6.0_13 and jre6
Directory for your java installation is
C:\Program Files\java

After installation u have to put a path to run your java programs in your JVM(Java Virtual Machine)

Path is:
1] Right click on My Computer->Advanced->Environment Variables->There u will see User variables and system variables->on user variables click edit->Give variable name[PATH] and varable path[C:\Program Files\java\jdk\bin]->Apply your settings


To check that the java path is correct follow these steps:
1]Open ms-dos
2]write javac and press enter
3]If a long list comes then your java programs can be easily compiled on JVM
4]If on pressing enter the following message occurs "javac is not an internal command" then you have to set your path again


Now if java has started running on your computer you have to follow these steps to write your first code using JAVA
1]Open notepad
2]write following line of code or copy this code
class Demo{
public static void main(String [] args)
{
System.out.println("Hello World!!");
}
}


Save this program:Use following convention if having problem in running your pgm
D:/JavaPrograms/Demo.java
To run follow these steps:
1]Open MS-DOS to see the output
2]write[javac Demo.java]
3]then press enter
4]then write[java Demo]