The Future Is Behind You

Array from a String

Fill an array split from a string character by character.

public class Test {

  private static String alphabet = "abcdefghijklmnopqrstuvwxyz";

  public static void main(String[] args) {
    alphabet();
  }

  public static void alphabet() {
    String[] array = alphabet.split("(?!^)");

    for (String c : array) {
      System.out.println(c);
    }
  }
}

Output:

a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z

a = b = c