Simple Java Program For Payroll System
Simple Payroll Program Java Free
Use string method to do the string comparison instead of!= or. One of the problem in your code is this statement: while (divisionName!='stop')change it to while(!('stop'.equals(divisionName)))!= will chech whether the two objects are not the same memory object, while equals method will do the string contents comparison.Also note the reverse comparision of string ' stop' against the divisionName. This will help to avoid null pointer exception in case divisionName is null.Learn more about string comparison from a related post.