package com.altafjava.test;
public class Test {
public static void main(String[] args) {
String s="526";
int sum=0;
for(int i=0;i<s.length();i++){
sum=(sum*10)+(s.charAt(i)-48);
}
System.out.println("Original string = "+s);
System.out.println("Converted integer = "+sum);
}
}
RECENTLY MOST VIEWS
-
import java.util.HashSet; class DuplicateNumberArray2 { public static void main(String[] args) { String[] arr = {"xy...
-
import java.util.HashSet; class DuplicateNumberArray { public static void main(String[] args) { int[] arr={1,2,3,1,10,20,30,20,1};...
-
// Java Program to view System Properties class SystemProperties { public static void main(String[] alt) { System.out.println(...
-
package com.altafjava.fdeia.test; import java.util.HashSet; public class Test2 { public static void main(String[] args) { int[]...
-
/* Write a JAVA program for the given string and take another string and check whether the taken string is substring of given string or no...
-
/* Count occurrence of each character of given string Input:-"Sriman java group" Output:- S-1, r-2, i-1, m-1, a-3, n-...
-
import java.util.ArrayList; import java.util.Collections; import static java.lang.System.out; class ReverseList { public static void ...
-
/* WAP to print char occurrence in given string I/P : s=anand s2=prabhakar O/P : 3a 0n a n 0d */ import java.util.regex.Matcher;...
MOST POPULAR
-
Note: A number will be called DISARIUM if sum of its digits powered with their respective position is equal to the original number. For e...
-
The International Mobile Station Equipment Identity(IMEI) is a number, usually unique, to identify mobile phones, as well as some satellit...
-
Harshad Number : In recreational mathematics, a Harshad number (or Niven number), is an integer (in base 10) that is divisible by the sum ...
-
package com.altafjava.sln.test; public class SecondLargestNumber { public static void main(String[] args) { int[] arr={5,20,8,1...
-
For example, If given number 165 a nd given digit is 6 then you should find the largest number less than 165 but it should not contain ...
Blog Archive
-
▼
2018
(38)
-
▼
August
(19)
- How to convert string into int primitive data type?
- Write a JAVA program for the given string and take...
- How to find largest number less than a given numbe...
- How to count occurrences of each character of a st...
- How to count occurrences of each character of a st...
- How to find second largest number in an integer ar...
- How to find sum of all digits of a number in java?
- How to find duplicate elements in an array using H...
- How to find duplicate elements in an array?
- Java Program to check two strings are Anagram or not
- How do you check the equality of two inner arrays ...
- How do you check the equality of two arrays in java?
- How to count duplicate characters in a string in j...
- How to find duplicate characters in a string in java?
- How do you remove all white spaces from a string i...
- How do you remove all white spaces from a string i...
- How to print Number Pyramid Pattern in java?
- How to create a pyramid of numbers in java?
- How to reverse a string in java?
-
▼
August
(19)
About
Hello ALTAF
All Java Interview Programs
convert-string-to-int
How to convert string into int primitive data type?
Friday, August 24, 2018
Subscribe to:
Post Comments (Atom)
Program List
- armstrong
- char-occurrances
- check-anagram
- check-duck-no
- check-duplicate-no
- check-endianess-of-os
- check-equality-of-two-arrays
- check-fibonacci-series
- check-harshad-no
- check-kaprekar
- check-keith-no
- check-niven-no
- check-palindrome
- check-prime
- check-prime-no
- check-substring
- check-unique-no
- check-valid-imei
- convert-array-to-list
- convert-string-to-int
- count-duplicate-char-in-string
- count-occurrences-char-of-string
- create-immutable-class
- disarium
- filter-number
- find-1st-non-repeat-char
- find-common-no-in-array
- find-duplicate-char-in-string
- find-duplicate-no-in-array
- find-largest-no-less-than-given-no
- find-palindrome
- find-second-largest-number
- image-store-in-database
- jdbc-program
- number-pyramid-pattern
- numeric-pattern
- remove-duplicate-in-string-array
- remove-white-space-of-string
- reverse-list
- reverse-string
- search-element-in-array
- search-list
- sorting-array
- sorting-list
- sorting-user-defined-object
- string-reverse
- sum-of-all-digits
- swap-2-no
- view-system-properties
0 Comment to "How to convert string into int primitive data type?"
Post a Comment