Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

string to int

num = '10'
  
# check and print type num variable
print(type(num)) 
  
# convert the num into string 
converted_num = int(num)
  
# print type of converted_num
print(type(converted_num))
  
# We can check by doing some mathematical operations
print(converted_num + 20)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #string #int
ADD COMMENT
Topic
Name
7+6 =