convert string to int and check int java code example
Example 1: string to int java
int result = Integer.parseInt(number);
Example 2: conversion of string to integer in java
Integer.parseInt(str);
int result = Integer.parseInt(number);
Integer.parseInt(str);