จาวาข้อความแบ่งแต่ละอักขระ

รหัสตัวอย่าง

2
0

แยกกันทุกตัวอักษรในข้อความเข้าไปในตารางคู่ลำดับของจาวา

String s="abcd";
char[] a=s.toCharArray();
1
0

แยกกันทุกตัวอักษรในข้อความเข้าไปในตารางคู่ลำดับของจาวา

String s="abcd";
char[] a=s.toCharArray();
1
0

จาวายังไงที่จะแบ่งข้อความในจดหมาย

//Java program to show the use of Split method (Java 8 and above)
public class SplitString{

  public static void main(String[] args) 
  {
    //Initialize the String which needs to be split
    String str = "Enlighter";
    
    //Use the Split method and store the array of Strings returned in a String array.
    String[] arr = str.split("");
    
    //Printing the characters using for-each loop
    for(String character : arr)
      System.out.print(char);
0
0

แยกแต่ละตัวละครในข้อความ(ภาษาจาวา language)

 class Test {
         public static void main( String[] args) {
             String[] result = "Stack Me 123 Heppa1 oeu".split("\\a");                                                                                   

             // output should be
             // S
             // t
             // a
             // c
             // k
             // M
             // e
             // H
             // e
             // ...
             for ( int x=0; x<result.length; x++) {
                 System.out.println(result[x] + "\n");
             }
         }
     }

หน้าคล้ายกัน

คล้ายกันหน้ากับตัวอย่าง

ในภาษาอื่นๆ

หน้านี้อยู่ในภาษาอื่นๆ

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................

ดังอยู่ในนี้หมวดหมู่

ดังหน้ากับตัวอย่างอยู่ในหมวดหมู่