Check whether an integer is palindrome in java

https‮.www//:‬lautturi.com
Check whether an integer is palindrome in java
/**
 * @author lautturi.com
 * Java example:check if a number is palindrome or not in java
 */

import java.util.*;

public class Lautturi {

	public static void main(String[] args) {

		int i=123321;  
		String str = Integer.toString(i);
		String reverse =  new StringBuilder(str).reverse().toString();
        if( str.equals(reverse)) {
        	System.out.println("It's a palindrome");
        }
        else {
        	System.out.println("It's not a palindrome");
        }

	}
}

output:

It's a palindrome
Created Time:2017-09-17 14:47:09  Author:lautturi