1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lapo4ka [179]
3 years ago
11

I just need some help working out this Java code! I can list the instructions below:

Computers and Technology
1 answer:
Ipatiy [6.2K]3 years ago
5 0

Answer:

public class CountSpaces

{

   public static void main(String[] args)

   {

       String quote = "The concept of infinity is meaningless inside of an insane human mind.";

       int nrSpaces = calculateSpaces(quote);

       System.out.println("Nr spaces in your quote is " + nrSpaces);

   }

   

   public static int calculateSpaces(String inString)

   {

       int count = 0;

       

       for (int i = 0; i < inString.length(); i++) {

           if (inString.charAt(i) == ' ') {

               count++;

           }

       }

       return count;

   }

}

Explanation:

In this example there is only one class, and since all methods are static the true concept of the class is not even being used.

You might be interested in
I
Naily [24]

Answer:

True

Explanation:

Not(False) OR False = True OR False = True

4 0
3 years ago
Define a class in Java to accept and store the list of 10 names in an array. Print the
dem82 [27]

Answer:

public class Main

{

public static void main(String[] args) {

String[] strs = new String[10];

java.util.Scanner sc = new java.util.Scanner(System.in);

    for(int i = 0; i < 10; i++){

        System.out.print("Enter string " + (i+1) + ":");

        strs[i] = sc.nextLine();

    }

    System.out.println("The strigs with even number of characters is");

    for(int i = 0; i < strs.length;i++){

        if(strs[i].length() % 2 == 0){

            System.out.println(strs[i]);

        }

    }

}

}

Explanation:

8 0
2 years ago
Can we opne a website form PowerPoint slide ​
Phoenix [80]

Answer:

Yes

Explanation:

Type in the link, play the presentation and click the link. Or hover over the link and press ctrl + click at the same time. (Don't know if I got the last part right)

3 0
4 years ago
Read 2 more answers
4.15 LAB: Password modifier
Black_prince [1.1K]

I've included my code in the picture below. Best of luck.

3 0
3 years ago
What is one outcome of an integration point?
mylen [45]

Answer:

What is one outcome of an integration point? It provides information to a system builder to potentially pivot the course of action. It bring several Kanban processes to conclusion. It supports SAFe budgeting milestones.

5 0
4 years ago
Other questions:
  • In order to delete an object, it must be?
    14·1 answer
  • Which of these is not a potential cause of data loss?
    7·2 answers
  • What was the first e-commerce service?
    10·1 answer
  • I need to know what is share market plssss
    8·2 answers
  • Can u tell me the answers to this table ​
    12·1 answer
  • What online server provides you space to store and launch your website?
    11·1 answer
  • Assume that you have 22 slices of pizza and 7 friends that are going to share it (you've already eaten). There's been some argum
    9·1 answer
  • What is the purpose of exploring data?
    6·2 answers
  • What are your thoughts about this re-designed Logo? Is it good? Or is poorly designed? Explain your answer below.
    13·1 answer
  • Writea SELECT statement that uses the ranking functions to rank products by the total quantity sold. Returnthese columns:The pro
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!