Skip to content

Commit 5b90eb0

Browse files
authored
Update Conversion1.java
1 parent 3918c84 commit 5b90eb0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Conversion1.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
//############# String to Integer Conversion ###############################
2+
//############# String to Integer Using parseInt() method Conversion ###############################
33

44
public class Conversion1
55
{
@@ -10,3 +10,16 @@ public static void main(String[] args)
1010
System.out.println(n);
1111
}
1212
}
13+
14+
15+
//############# String to Integer Using valueOf() method Conversion ###############################
16+
17+
18+
public class Conversion1{
19+
public static void main(String args[])
20+
{
21+
String s="6000";
22+
Integer i=Integer.valueOf(s);
23+
System.out.println(i);
24+
}
25+
}

0 commit comments

Comments
 (0)