You can easily convert the char to String.
char aCharacter = 'c'; String aCharacterAsString = String.valueOf(aCharacter);
So in your case:
a.add(Integer.parseInt(String.valueOf(number.charAt(i))));
Related Posts:
- Problem with gif with transparent background
- Search for words with telephone numbers from 2-3-4 tree
- Java 8 Iterable.forEach() vs foreach loop
- How to round a number to n decimal places in Java
- Error unable to access jarfile C:\Jar
- In laymans terms, what does ‘static’ mean in Java? [duplicate]
- Sort an array in Java
- Java String Split by “|”
- Could not reserve enough space for object heap
- Cannot make a static reference to the non-static method fxn(int) from the type Two [duplicate]
- How can I use pointers in Java?
- JavaFX – Exception in Application start method?
- Is there a stopwatch in Java?
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- Print ArrayList
- Unsupported major.minor version 52.0 [duplicate]
- What is a StringIndexOutOfBoundsException? How can I fix it?
- Non-static variable cannot be referenced from a static context
- Why is there no SortedList in Java?
- How to convert any Object to String?
- How do I copy an object in Java?
- Unfortunately MyApp has stopped. How can I solve this?
- What is the significance of load factor in HashMap?
- Which HTML Parser is the best?
- Returning Arrays in Java
- java.lang.ClassCastException
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘MyController’:
- Can I multiply strings in Java to repeat sequences?
- Gradle does not find tools.jar
- Constructor cannot be applied to given types?
- Mocking static methods with Mockito
- Finding the max/min value in an array of primitives using Java
- How to for each the hashmap?
- Why do I get SQLCODE=-204, SQLSTATE=42704 with DB2 LUW and WebSphere App Server?
- java.net.UnknownHostException: Invalid hostname for server: local
- HashMap get/put complexity
- @Autowired – No qualifying bean of type found for dependency
- SSH library for Java
- Java ArrayList replace at specific index
- Exception in thread “main” java.lang.OutOfMemoryError: Java heap space
- What is the best math library to use with java?
- org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘demoRestController’
- What causes java.lang.IncompatibleClassChangeError?
- Add an object to an Array of a custom class
- What does java.lang.Thread.interrupt() do?
- java string cannot be converted to boolean error
- Double decimal formatting in Java
- Converting JSON to XML in Java
- Import a custom class in Java
- Default keystore file does not exist?
- The declared package does not match the expected package “”
- Sort a Map
by values - Is not an enclosing class Java
- FtpClient storeFile always return False
- Get a resource using getResource()
- Java comparing generic types
- Simplest way to read JSON from a URL in Java
- Display Animated GIF
- Why is my method undefined for the type object?
- Java can’t find file when running through Eclipse
- How do I draw a triangle?
- Java path..Error of jvm.cfg
- How to fix the compiler error in this program?
- int cannot be converted to int []
- Joda DateTime to Timestamp conversion
- break statement in “if else” – java
- What is the difference between JSF, Servlet and JSP?
- Get only part of an Array in Java?
- How to Get JSON Array Within JSON Object?
- What is a class constant?
- How to represent a fix number of repeats in regular expression?
- How to import a jar in Eclipse
- What is method hiding in Java? Even the JavaDoc explanation is confusing
- Error: class X is public should be declared in a file named X.java
- How do I convert this for loop into a while loop?
- Java switch statement: Constant expression required, but it IS constant
- Resolving File paths – ‘File not found’ error in Eclipse
- Simple Coin Toss using random class in Java. The do while loop doesn’t seem to generate random results
- Why I am getting DefaultHttpClient is deprecated?
- When should you use multithreading? And would multi threading be beneficial if the different threads execute mutually independent tasks?
- How to Convert Int to Unsigned Byte and Back
- Suggestions needed: Effective Java to C source code converter
- Downloading a file from spring controllers
- Java Error Exception in thread “AWT-EventQueue-0” java.lang.StackOverflowError
- Write a program that reads an unspecified number of integers, determines pos, neg, total, average
- Parsing JSON string in Java
- java attempting to assign weaker access privilege error
- Getting a “no interface expected here” when I try to subclass ServiceConnection [duplicate]
- How to determine day of week by passing specific date?
- MessageBodyWriter not found for media type=application/json
- Conversion from Long to Double in Java
- Failed to find Java VM
- Java regex email
- Java Iterator on Doubly-linked-list
- Why “no projects found to import”?
- Java Swing setting JPanel Size
- how to use “tab space” while writing in text file
- Change Name of Import in Java, or import two classes with the same name
- set background color: Android
- Class JavaLaunchHelper is implemented in two places