Skip to content

Commit 66d3548

Browse files
committed
valueOf() and parseInt()
1 parent b44b32b commit 66d3548

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Readme.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Java-Operations
22

3+
## *valueOf() and parseInt() of Java*
4+
5+
#### *valueOf() returns an instance of Integer class, while parseInt() return a variable of int data type!*
6+
7+
```java
8+
9+
String s = "100";
10+
11+
Integer k = Integer.valueOf(s);
12+
13+
int kk = Integer.parseInt(s);
14+
15+
```
16+
317
## *Inheritance and object references:*
418

519
*See the CASES mentioned in the main class!*

0 commit comments

Comments
 (0)