|import java.util.*; public class Example { public static void main(String[] args) { String name = "John Matthew Adams"; System.out.println("The full name is: " + name); System.out.print("Initials...


Please explain the two for-loops in detail.


|import java.util.*;<br>public class Example {<br>public static void main(String[] args) {<br>String name =

Extracted text: |import java.util.*; public class Example { public static void main(String[] args) { String name = "John Matthew Adams"; System.out.println("The full name is: " + name); System.out.print("Initials with surname is: "); int len = name.length(); name = name.trim(); String str1 = ""; 0; i < len;="" i++)="" {="" for="" (int="" i="" char="" ch="name.charAt(i);" if="" (ch="" !=' ' )="" {="" stri="" stri="" +="" ch;="" }="" else="" {="" system.out.print(character.touppercase(str1.charat(0))="" +="" ".="" ");="" stri="" ;="" }="" }="" string="" str2="" ;="" %3d="" for="" (int="" j="0;" j="">< str1.length();="" j++)="" {="" if="" (j="" str2="str2" +="" character.touppercase="" (str1.charat(0));="" 0)="=" %3d="" else="" str2="" str2="" +="" character.tolowercase(str1.charat(j));="" }="" system.out.println(str2);="" }="" }="" output="" the="" full="" name="" is:="" john="" matthew="" adams="" initials="" with="" surname="" is:="" j.="" m.="">

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here