ritesh

top navigation
 
Ritesh Mandal Dr.
   

JAVA - Beginners

 
 
 
     
     

Java just for beginners :

Install it first :

All you need is a Java Development kit

the JDK is a free download from http://java.sun.com
The one I downloaded is a file "jdk-1_5_0_09-windows-i586-p", hope it works for you too.

Writing first java program

once JDK is installed , you dont need any special tools to get started, the existing notepad or vi in Linux is sufficient.

We will start with the typical code to print something. You have to name it as filename.java. To save correctly use double quotes while saving it in Windows (as shown in the example below).

Java is case sensitive : Java is case sensitive Ritesh and ritesh are not the same. Make sure to use the correct case while working with java. Its better practice to use lowercase because some words in Java are reserved as lowercase.


THE CODE : 

class pehlipehlibaar
{  
   public static void main(String args[])
   {
      System.out.println("Hi this is Ritesh");
   }
}
Oh sorry before saving the .java file just a word where to save it. U have to save the java file in the bin directory of the jdk. So search for the directory where you installed the JDK thing. You can avoid this my setting Environment variables for java in the Operating System.

first java code

running first java class


Java reserved words :
Every Programming language and other stuffs like Databases etc. have a list of reserved words which cannot be used as user defined entries. For example you cannot start a java program with class private because "private" is a reserved word (keyword) for Java.

So here is list fo keywords

abstract byte char continue double final for implements int native private return strictfp synchronized throws void boolean case class default else finally goto import interface new protected short super this transient volatile break catch const do extends float if instanceof long package public static switch throw try while


THE PAGE IS SLOWLY UNDER UPGRADATION.. BEAR WITH ME!

     
 
 
      Tutorial : Ritesh Mondal and Alex Philipl  
  MY TUTORIALS FOR BEGINNERS :
Medical Coding | Web Designing | Oracle | MySQL | Linux | ICH GCP | Clinical Data Management | Indian Clinical Trials | 21 CFR Part 11 | Web server | PHP | 443 & SSL | Web Hosting | GXP India | Apache | Other Databases | Image Editing | Software validation | Networking | Guitar | Disclaimer of use
 
 
 
 
© www.riteshmandal.com
Contact : ritesh@riteshmandal.com