saving String character in arraylist

//storing String character in arraylist
import java.util.*;
public class Basic_Practice2 {
	public static void main(String[] args) {
		
		String s = "Hello";
      
		ArrayList<String> al = new ArrayList<String>();
      //storing String character in arraylist
		for(int i = 0; i < s.length(); i++)
			{
				al.add(Character.toString(s.charAt(i)));
			}
      // printing ArrayList
		System.out.println(al);//[H,e,l,l,o]
		
	}
}

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
split string to list of chars java string to character list java string to character list cast string to list java char list java' transfer each letter of string to arraylist move string chars into arraylist in one line java convert string into char list ATRING LIST TO CHAR LIST java convert a string into a cahr list convert string into a list of characters java convert string to a list of chars java how to convert string to character arraylist in java how to convert string to list in java string to collection of char java string to list how to create a list with characters in java how to get all the chars in java convert string to Character collection java saving string characters into list java arraylist of characters in java How to turn a string to a list in java how to put each character from a string to a list java Java word to char list string to char list java string to char list creating character list in java how to convert a string into a list in java convert string to set of characters java convert string to char list java 8 convert string to char list java List&lt;Character&gt; java string to list of characters java char to list java how to convert string to list object in java convert string into list of character in java convert string to list of characters java string to list of chars java string to characte array list convert a string to a list of collection characters java create set of characters from string java store string char to arraylist java convert a string to a list of characters java standard way of converting strings to list in java create list of characters from string java java list of characters from string change java string to lisrt of characters java char arraylist how to make a string out of char array list convert string to arraylist change string to character list in java change string to list in java how to convert a string to a list in java store characters of a string in arraylist java saving String character in arraylist
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source