Skip to content

Commit 487c950

Browse files
类型转换
1 parent dd50662 commit 487c950

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/com/string/StringToIntegerDemo.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static void main(String[] args) {
1616
// objectToString();
1717
// nullToEmpty();
1818
// strToInteger();
19-
integerValueOfDemo();
19+
// integerValueOfDemo();
2020
}
2121

2222
public static void nullToEmpty() {
@@ -41,4 +41,9 @@ public static void integerValueOfDemo() {
4141
Integer value = Integer.valueOf(str);
4242
System.out.println(value);
4343
}
44+
45+
public static void intToInteger() {
46+
int value=0;
47+
Integer val=(Integer)value;
48+
}
4449
}

0 commit comments

Comments
 (0)