intとIntegerほ違い

int型はプリミティブ型と呼ばれるタイプで、普段よく使う基本的な整数型変数
Integer型というのは、Objectクラスをスーパークラスとする参照型変数
要するに、Integer型はObject型
Integer型をint型に変換
int a = ((Integer)sort1.get(sort1.size() – 1)).intValue();
Intgerの定義方法
Integer a = new Integer(int型));
http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q1211095667

タイトルとURLをコピーしました