The method parseInt is used to convert a numeric integer string into a value of type int. code example Example: conversion of string to integer in java Integer.parseInt(str);