Wednesday, December 5, 2012

Proper logout link as follows after click on browser back button


http://www.javaworld.com/javaworld/jw-09-2004/jw-0927-logout.html?page=1


Tuesday, December 4, 2012

Factorial Program:


public class Factorials {

/**
* @param args
*/
public static void main(String[] args) {
System.out.println("Inside main class");
System.out.println("factorial of 5:"+fact(5));

}

static int fact(int num) {
if (num == 0 || num == 1)
return 1;
else if (num < 0)
return 0;
else
return num * fact(num - 1);
}
}