Skip to content

Instantly share code, notes, and snippets.

@PandyYang
Created May 11, 2018 14:03
Show Gist options
  • Save PandyYang/d966760f07b8aaa2726418ae1a587d6b to your computer and use it in GitHub Desktop.
Save PandyYang/d966760f07b8aaa2726418ae1a587d6b to your computer and use it in GitHub Desktop.
package cn.insist;
/**
* @author Pandy
* @date 2018/5/11 21:51
*/
public class Demo23232 {
public static void main(String[] args) {
//构建一个新分配的integer对象,它表示指定的int值
Integer i = new Integer(4);
//表示String参数所指示的int值
Integer ii = new Integer("4");//可以传入有一个数字字符串
Integer iii = Integer.valueOf(4);
//以int类型返回该integer值
int num = i.intValue();
System.out.println(num);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment