8:41 pm - Thursday April 25, 2019

Getting started with java

Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

Getting started with java

Java is an open source software anyone can Download  the software from oracle link http://www.oracle.com/technetwork/java/javase/downloads/index.html  and install it.


l  Java is case sensitive

whitespace doesn’t matter for compilation


Setting class path to java

  1. Open cmd from run



Now type set path=”location of ur java bin folder”



To check whether the path has been set properly type javac and press enter





Developing your first java program


Open an editor like notepad, wordpad, notepad++.. etc, and start typing or paste the code given below


//simple program to display welcome in java

class Sample


public static void main(String arg[])





Save your java code as Sample.java


Compiling your java code:

                Javac Sample.java

Javac is a command used to compile your java code


Executing your java program

Java Sample.java

Java is an interpreter used to execute your class file


Naming Standards:



Keywords should be in small letter


public , static, int, float etc..


Class name, interface name

First letter should be caps and first letter in a  2nd word also be in caps

This type of naming convention is known as Pascal naming convention.


class CandidTraining{



Methods and variable

Starts with a small letter and first letter in a 2nd word should be caps

The other convention, the camel naming convention, capitalize the initial of each word, except the first word


void setData()


Should be in CAPS


public static final int MIN=10;

Types of errors:

  1. Syntax Errors

Detected by the compiler

  1. Runtime Errors

Causes the program to abort

  1. Logic Errors

Produces incorrect result



Filed in: Z-A All Java Codes

No comments yet.

Leave a Reply