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
Andrei [34K]
3 years ago
13

Java what are synchronized functions.

Computers and Technology
1 answer:
adelina 88 [10]3 years ago
4 0

<h2>answer:</h2>

Synchronized method is used to lock an object for any shared resource. When a thread invokes a synchronized method, it automatically acquires the lock for that object and releases it when the thread completes its task.','.

You might be interested in
Can include the 5-tuple information, which is the source and destination ip addresses, source and destination ports, protocols i
Delicious77 [7]

<span>The answer is Firewall Log.  The </span>Logging tab is a tabled, real-time and up-to-date integration of the traffic logs generated by the Firewall. It will show all the connections that have been active on your computer.  <span>You can also use the Windows Firewall log file to monitor TCP and UDP connections and packets that are blocked by the firewall.</span>

7 0
3 years ago
The first character of the VIN designates which of the following? 
Dennis_Churaev [7]

country or origin is usually the first character of a vin #

7 0
4 years ago
Read 2 more answers
Construct sequence using a specified number of integers within a range. The sequence must be strictly increasing at first and th
natulia [17]

Answer:

Explanation:

The following code is written in Java. It first creates a function that takes in the three parameters to create the sequence, if the sequence is valid it returns the created sequence, otherwise it prints -1 and returns an empty array. The second function called compareSequences takes in to sequences as parameters and compares them, printing out the winner. A test case has been provided in the main method and the output can be seen in the image below.

import java.util.Arrays;

class Brainly {

   public static void main(String[] args) {

       int[] seq1 = createSequence(5, 4, 2);

       int[] seq2 = createSequence(5, 3, 3);

       System.out.println("Winner: " + Arrays.toString(compareSequences(seq1, seq2)));

   }

   public static int[] createSequence(int num, int upperEnd, int lowerEnd) {

       int[] myArray = new int[num];

       int middle = (int) Math.floor(num/2.0);

       myArray[0] = upperEnd;

       myArray[num-1] = lowerEnd;

       int currentValue = upperEnd;

       for (int i = 1; i < num-1; i++) {

           if (i <= middle) {

               myArray[i] = currentValue + 1;

               currentValue += 1;

           } else {

               myArray[i] = currentValue - 1;

               currentValue += 1;

           }

       }

       System.out.println(Arrays.toString(myArray));

       if (myArray[num-2] < lowerEnd) {

           System.out.println("-1");

           int[] empty = {};

           return empty;

       } else {

           return myArray;

       }

   }

   public static int[] compareSequences(int[] seq1, int[] seq2) {

       int lowestLength;

       if (seq1.length > seq2.length) {

           lowestLength = seq2.length;

       } else {

           lowestLength = seq1.length;

       }

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

           if (seq1[i] > seq2[i]) {

               return seq1;

           } else if (seq1[i] < seq2[i]) {

               return seq2;

           }

       }

       if (seq1.length > seq2.length) {

           return seq1;

       } else {

           return seq2;

       }

   }

}

7 0
3 years ago
What type of organizational structure would you want to use for this company (by function, by process, by product, and so on)? E
zhuklara [117]
I would prefer a cotton company because we're all can make cloths.
3 0
3 years ago
Free wifi is typically offered on an <br> a) unencrypted<br> b) encrypted<br> c) open<br> d) private
aliya0001 [1]

c) open

I think this because when you're in an open space (such as starbucks) it's public for anyone to enter. I think.

7 0
3 years ago
Read 2 more answers
Other questions:
  • After configuring a static IP address on a desktop computer, the technician finds that he cannot communicate with other devices
    10·1 answer
  • Data hiding, which means that critical data stored inside the object is protected from code outside the object, is accomplished
    14·2 answers
  • 3. Assume a disk drive from the late 1990s is configured as follows. The total storage is approximately 675MB divided among 15 s
    11·1 answer
  • Which segment of society introduced the grunge look?
    5·2 answers
  • A network administrator for a small company is contemplating how to scale the network over the next three years to accommodate p
    13·1 answer
  • In this challenge, write a function to add two floating point numbers. Determine the integer floor of the sum. The floor is the
    8·1 answer
  • Why are computers complicated?
    15·1 answer
  • If a triathlon is a sport combining three events, what do you think would be the word for a sport combining five events?
    7·1 answer
  • Answer This One Question Right For Brainliest
    10·1 answer
  • Write a short note on Ms - Excel...​..
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!