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
tekilochka [14]
3 years ago
12

What is meant by encapsulating semaphores? Bring out the need for it

Computers and Technology
1 answer:
artcher [175]3 years ago
8 0

Answer:

  Encapsulating semaphores basically allowing various codes to implemented in different modules.

Semaphores are used to implement in the synchronization process and give access to different types of variables. Encapsulate semaphore route so that the tasks performed and executed in a single routine.

Semaphore is the variable whose values basically indicates the status in the multitasking system. It is basically used to indicate the software and hardware flag in the system hiding and encapsulating data.

You might be interested in
(1) Prompt the user to enter a string of their choosing. Output the string.
barxatty [35]

Answer:

See solution below

See comments for explanations

Explanation:

import java.util.*;

class Main {

 public static void main(String[] args) {

   //PrompT the User to enter a String

   System.out.println("Enter a sentence or phrase: ");

   //Receiving the string entered with the Scanner Object

   Scanner input = new Scanner (System.in);

   String string_input = input.nextLine();

   //Print out string entered by user

   System.out.println("You entered: "+string_input);

   //Call the first method (GetNumOfCharacters)

   System.out.println("Number of characters: "+ GetNumOfCharacters(string_input));

   //Call the second method (OutputWithoutWhitespace)

   System.out.println("String with no whitespace: "+OutputWithoutWhitespace(string_input));

   }

 //Create the method GetNumOfCharacters

   public static int GetNumOfCharacters (String word) {

   //Variable to hold number of characters

   int noOfCharactersCount = 0;

   //Use a for loop to iterate the entire string

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

     //Increase th number of characters each time

     noOfCharactersCount++;

   }

   return noOfCharactersCount;

 }

 //Creating the OutputWithoutWhitespace() method

 //This method will remove all tabs and spaces from the original string

 public static String OutputWithoutWhitespace(String word){

   //Use the replaceAll all method of strings to replace all whitespaces

   String stringWithoutWhiteSpace = word.replaceAll(" ","");

   return stringWithoutWhiteSpace;

 }

}

6 0
2 years ago
If I had to choose the class I prefer it would be a
dmitriy555 [2]
How about you prefer no class
4 0
3 years ago
To ensure rapid recovery and security of data, backup data should be ________.
Nataly [62]

Answer:B kept at a secure location at the facility

Explanation:

8 0
3 years ago
10. Question<br> What are the drawbacks of purchasing something online? Check all that apply.
max2010maxim [7]

Explanation:

1) the quality of purchased good may be low

2) there might me fraud and cheaters

3) it might be risky

4) we may not get our orders on time

7 0
2 years ago
I have been trying to use brainly recently but i cant because everytime i watch an ad to get an answer, its an interactive ad, s
Troyanec [42]

Answer:

remove ads

Explanation:

by buying a no ad pack

5 0
2 years ago
Other questions:
  • Which of these is an aggregator?
    9·2 answers
  • Which three phrases describe a wireframe
    12·1 answer
  • Which reading strategy refers to reading only the key words and phrases?
    13·2 answers
  • Your task in this assignment is to exploit the race condition vulnerability in the above set-uid program. more specifically, you
    14·1 answer
  • How to tell if motherboard has bluetooth?
    8·1 answer
  • Which of the following is a quick way to restore the arrow pointer after you have used it for drawing?
    5·1 answer
  • How we know that how many domain exist in window server 2012?
    14·1 answer
  • You are planning a program to find the maximum heart rate recommended for patrons of a gym where you have a part-time job. One f
    13·1 answer
  • JUST NEED TO KNOW WHO ALL DOSE EDGINUITY
    12·2 answers
  • A file manager is used for all of the following except ____.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!