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.
Answer: TRUE
Explanation: Networking technology is the term used to describe the entire processes through which computer or mobile systems are linked up either through optic fibers,wireless systems in order to enhance effective communication across networks or regions.
OSI (open system interconnection), the earliest models partitions into seven layers and the OSI is known as model that creates partitioning a communication system classing them into abstraction layers.
Answer:
Hi there!
The correct answer will be: C. Pluto’s orbit crossed over the orbit of another planet.
Explanation:
When determining whether a planet is planet the IAU stated the planet must (a) is in orbit around the Sun, (b) has sufficient mass for its self-gravity to overcome rigid body forces so that it assumes a hydro-static equilibrium (nearly round) shape, and (c) has cleared the neighborhood around its orbit. For poor Pluto's case he did not clear part (c).
I don’t understand it sorry :(.