---
title: "把Strings转换成int和把int转换成String"
author: "achieve2015"
date: "2016-01-11T14:15:23Z"
tags: []
categories: ["编程语言"]
slug: "strings-int-int-string"
draft: false
lastmod: "2016-01-11T14:15:23Z"
id: 2269803
url: "https://achieve2015.iteye.com/blog/2269803"
---

String a = String.valueOf(2); 
//integer to numeric string   
int i = Integer.parseInt(a); 
//numeric string to an int
 String a = String.valueOf(2);   
//integer to numeric string
int i = Integer.parseInt(a); 
//numeric string to an int