Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to acces every char of a String in java

class Main
{
    // Iterate over the characters of a string
    public static void main(String[] args)
    {
        String s = "Techie Delight";
 
        // using simple for-loop
        for (int i = 0; i < s.length(); i++) {
            System.out.print(s.charAt(i));
        }
    }
}
Source by www.techiedelight.com #
 
PREVIOUS NEXT
Tagged: #acces #char #String #java
ADD COMMENT
Topic
Name
1+1 =