In your "count spaces method" before the for loop, you want to declare an int variable (let's call it spc)
then, each time you find that charat, spc++.
also, the string must be declared in the main method, not the spaces count method.
The actual code:
public class CountSpaces{
public static void main(String[] args){
String instring = "(your quote here)";
int spaces = calculateSpaces(instring);
System.out.println("The number of spaces is " + spaces);
}
public static int calculateSpaces(String in){
int spc = 0;
for(int i= 0; i<in.length; i++){
if(in.charAt(i)== ' '){
spc++;
}
}
return spc;
}
}
that should be it. If you have any questions, feel free to reach out.
A college meal plan allows students to PAY UPFRONT TO EAT A SPECIFIC NUMBER OF MEALS IN THE COLLEGE CAFETERIAS. Many colleges give students some degree of freedom when it comes to the choice of meal plans to sign up for. Students have to pay in advance for any meal they decide for.
Answer:
The answer is "XML"
Explanation:
Extensible Markup Language is a marking language, which specifies a collection of document. It uses the coding rules, which is readable for both man and computer.
- It is a scalable way of creating data formats and sharing structured data through the internet or private networks digitally.
- It permits the development of custom tags to identify, transfer, verify and view data among apps and organizations.
Answer:
im pretty sure its slide show
The option that is not a type of spoofing is creating a fake website for a well-known business.
<h3>What is email spoofing?</h3>
Email spoofing is known to be a method that is often used in spam and other forms of phishing attacks. This is often done to trick computer users to see that a message originate from a person or firm that they know.
Conclusively, The option that is not a type of spoofing is creating a fake website for a well-known business as it is not what spoofing is all about.
Learn more about spoofing from
brainly.com/question/23021587
#SJ1