About 9,890,000 results
Open links in new tab
  1. Java How To Convert a String to an Array - W3Schools

    There are many ways to convert a string to an array. The simplest way is to use the toCharArray() method: Convert a string to a char array: You can also loop through the array to print all array …

  2. string to string array conversion in java - Stack Overflow

    Jun 5, 2020 · static String[] convert(String... array) { return array; } String[] array = convert("name","age","hobby"); [Edit] If you want single-letter Strings, you can use: String[] s = …

  3. Java Program to Convert String to String Array - GeeksforGeeks

    May 19, 2022 · Convert the string set to Array of string using set.toArray () by passing an empty array of type string. Print the array of string. Example: Method 4: Using String tokenizer. String …

  4. Convert a String to Character Array in Java - GeeksforGeeks

    Jan 4, 2025 · In this article, we will learn various ways to convert a string into a character array in Java with examples. Example: The toCharArray() method is the simplest and most efficient …

  5. String to Array in JavaHow to Convert Strings to Arrays

    Jul 6, 2023 · The toCharArray() method is a built-in function in Java that allows you to convert a string into a character array. This method is available in the String class and provides a …

  6. Convert String to String Array - Baeldung

    Jan 8, 2024 · In this article, we’ve learned how to convert a String to a String array in Java. Simply put, converting a string to a singleton array is pretty straightforward. If we need to break the …

  7. How to convert a string to an array in Java - Atta-Ur-Rehman …

    Oct 10, 2021 · In an earlier article, we discussed different ways to convert an array to a string in Java. Today, you'll learn to convert a string into an array that contains subsets of input string …

  8. Java: How to Convert a String to an Array - A Comprehensive …

    Oct 27, 2023 · Learn multiple methods to convert a String to an Array in Java, including using the split() method, toCharArray(), and handling different scenarios with delimiters and data types. …

  9. Java: Convert String to String Array - A Comprehensive Guide

    In this tutorial, we covered various methods to convert a string to an array in Java, focusing on the String `split()` method and handling common pitfalls. Understanding these processes can aid …

  10. Java How To: Convert String to Array - CodeLucky

    In this comprehensive guide, we'll explore several methods to convert a string to an array in Java, complete with practical examples and detailed explanations. We'll cover both character arrays …

Refresh