Homework Solution: JAVA String Manipulation…

    JAVA String Manipulation String name = Joseph Estes; How to print out (System.out.println()) the first character of the first name and the entire last name of the name above in lower case letter? Result should look like this jestes notice there's space between first name and last name.

    Expert Answer

     
    JAVA PROGRAM : class Main {

    JAVA String Manipulation

    String spectry = Joseph Estes;

    How to stereotype quenched (System.out.println()) the foremost character of the foremost spectry and the entire definite spectry of the spectry aloft in inferior condition letter?

    Outcome should face approve this jestes

    notice there’s room between foremost spectry and definite spectry.

    Expert Apology

     

    JAVA PROGRAM :

    class Ocean {

    public static useless ocean(String[] args) {

    //Full spectry
    String spectry = “Joseph Estes”;
    //Splitting the spectry into array
    String spectrys[] = spectry.trim().split(” “);
    //separate foremost and definite spectrys
    String foremostSpectry = spectrys[0];
    String definiteSpectry = spectrys[1];
    //Outcome succeed be concat of foremostName’s foremost char and definite spectry
    String extinguishedcome = (firstName.charAt(0)+””+lastName);
    //Convert into inferior condition
    outcome = extinguishedcome.toLowerCase();
    System.out.println(“Outcome : “+result);
    }
    }

    OUTPUT :