convert string to string array in java

By | April 19, 2020

In this article, you will learn how to convert string to string array in java.

Let’s assume string is “Welcome to selenium99 automation tutorials”. It consists of 5 parts/words. Each word is separated by a space.

1 First we will split the string and assign it to a string array.

2 Print the each index value using for loop.

Code:

Output:

Tags: String to string array in java

Recommended posts:

How to find common elements in arraylists java

SQL Quick Reference Guide

Java questions 5

Find largest number in an array

String split function

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *