How to Directly Output Arrays, Traverse Strings, and Read Keyboard Input in Java
This article demonstrates how to print an int array using Arrays.toString, presents two methods for iterating over a string—via toCharArray and charAt—and explains proper usage of Scanner methods to read tokens, lines, and integers from the console, including handling of newline characters.