본문 바로가기

카테고리 없음

Simple Payroll Program Java

Simple payroll program java download

Simple Java Program For Payroll System

Calculator

Simple Payroll Program Java Free

Simple Payroll Program Java

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.