1. Using the String method charAt, write a loop that computes the number of words in the sentence given as the string sentence. 2. Write a loop that repeatedly asks for user input until a negative...


1. Using the String method charAt, write a loop that computes the number of words in the sentence given as the string sentence.


2. Write a loop that repeatedly asks for user input until a negative number is entered. Display each value entered and a farewell message when the loop ends.


3. What does the following loop display?


int n = 10;


while (n > 0)


{


System.out.println(n);


n = n - 3;


}



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here