Java Tutorial – 16 – Read Characters from a String into a Char Array

///Java Tutorial – 16 – Read Characters from a String into a Char Array

Java Tutorial – 16 – Read Characters from a String into a Char Array

FavoriteLoadingAdd to favorites

Get more lessons like this at

Java468x60

Learn how to program in java with our online tutorial. We will cover variables, loops, if else branching, arrays, strings, objects, classes, object oriented programming, conditional statements, and more.

Learn how to read a characters from a string into a character array.

source

By |2020-04-03T02:39:36+00:00April 3rd, 2020|Java Video Tutorials|10 Comments

10 Comments

  1. sandeep sekhon April 3, 2020 at 2:39 am - Reply

    hey i want this code pls help me
    once you’ve got the two double arrays use two nested for-each loops (one inside another) to iterate through the two double arrays compare each element from the first array to each of the second array increment a counter variable every time an overlapping number is found in java

  2. Jacky Zhu April 3, 2020 at 2:39 am - Reply

    the second param of getChars is not the length of str, the end index, instead.

  3. Joel Morton April 3, 2020 at 2:39 am - Reply

    Excellent video, this is exactly what I needed. One question: In the video you count 12 characters in the String, but then you store 13 characters in the array and print 13 characters out (0-12 inclusive). Why doesn't Java have a compile error since nothing is stored in the 13th element (index 12) of the array? Does it store it as null, and if so why doesn't it print out "null"?

  4. Archana April 3, 2020 at 2:39 am - Reply

    How to get the Unicode value of a string

  5. NaN April 3, 2020 at 2:39 am - Reply

    thank you sir , wish you all the best !

  6. Faraz Khan April 3, 2020 at 2:39 am - Reply

    Please can you help me how can i get the index number with the name by user input for example suppose i enter letter j or any name letter one by one to check it's array index number like the following below.
    array[0]=j
    array[1]=a
    array[2]=s
    array[3]=o
    array[4]=n
    array[5]=g
    array[6]=i
    array[7]=b
    array[8]=s
    array[9]=o
    array[10]=n

  7. Rocco April 3, 2020 at 2:39 am - Reply

    thanks!!!! great content!

  8. Mykola Murza April 3, 2020 at 2:39 am - Reply

    for()… please… for()

  9. Marco DiSilvestre April 3, 2020 at 2:39 am - Reply

    What do you do if you want the length to always be the same length as the amount of chars in the string?

  10. Azhin Kaka Rash April 3, 2020 at 2:39 am - Reply

    well done

Leave A Comment

*