JAVA JAVA JVAAV JAVA JAVA ONLY FAST PLEASE THANK U please please please help me
ID: 3803762 • Letter: J
Question
JAVA JAVA JVAAV JAVA JAVA ONLY FAST PLEASE THANK U
please please please help me out!!!!! I need it fast
gram: and then displays the following men are making a program that asks user for their favorite quote, the Calculate the length of the quote Calculate how many words are in the quote Calculate the number of spaces in the quote the quote occurrences Calculate the number of display the number of ook for a specific user-inputted character, and dit the quote isplay the whole quote hould be able to keep choosing from the options above until they choose '8' to quit th on must be in its own method. The menu should also have its own method. described below in more detail.Explanation / Answer
class StringPgm
{
public static void main(String args[])
{
int word=1;
int charlen
String str="Java and JavaScript are not the same thing";
char strarray[] = str.toCharArray();
charlen = sizeof(stringarray);
for(int i=0;i<str.length();++i)
{
if(str.charAt(i)==' ')
word++;
}
System.out.println(Str.length());
System.out.println("Number of words="+word);
System.out.println("Number of spaces="+(word-1));
System.out.println("Number of character="+charlen);
System.out.println("String is="+str);
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.