Java program to print the length of all strings from a given array
KW.java
Output
kodingwindow@kw:~$ javac KW.java
kodingwindow@kw:~$ java KW ——————————————————————————————————————————— Program to print strings and its length ——————————————————————————————————————————— Array contains the following strings { Mouse Keyboard Processor Pen Drive Joystick } Mouse 5 Keyboard 8 Processor 9 Pen Drive 9 Joystick 8 ——————————————————————————————————————————— kodingwindow@kw:~$
Advertisement