5. vars

Created Friday 20 March 2015

http://www.roseindia.net/java/beginners/Varconstltr.shtml

public class varconstltr{
public static final int constint=5; // final is for constant
public static void main(String[] args){
int intvariable;
for (int i = 0;i <= 10;i++){
intvariable = i;
System.out.println("All the values are : \n intvariable = "

+ intvariable + "\nconstint = " + constint);
}
System.out.println("Directory of this file : c:\\code\\varconstltr.java");
}
}

http://docs.oracle.com/javase/tutorial/java/nutsandbolts/variables.html



Backlinks: