top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Which one would be easy to write? synchronization code for 10 threads or 2 threads in JAVA?

0 votes
386 views
Which one would be easy to write? synchronization code for 10 threads or 2 threads in JAVA?
posted Oct 21, 2016 by Yogish

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

Which one will be faster in Java, Increment operator or Decrement operator?

a) for(int i = 0; i < 1000; i++) {}    
b) for(int i = 1000; i > 0; i--) {}
+3 votes

Implement a code that counts the occurrences of each word in an input file and write the word along with corresponding count in an output file sorted by the words alphabetically.

Sample Input

Gaurav is  a Good Boy
Sita is a Good Girl
Tommy is  a Good Dog
Ram is a Good person

Sample Output

D:\>Java FileWordCount inputFile.txt outputFile.txt
    Boy : 1
    Dog : 1
    Gaurav : 1
    Girl : 1
    Good : 4
    Ram : 1
    Sita : 1
    Tommy : 1
    a : 4
    is : 4
    person : 1
+1 vote

What are the messages are exchanged between UE and network to evaluate the approximate position of the UE ?

+2 votes

Assumption:

  • The input strings will contain only numeric digits
  • The input strings can be of any large lengths
  • The lengths of the two input string need not be the same
  • The input strings will represent only positive numbers

Example

If input strings are “1234” and “56”, the output string should be “1290”
If input strings are “56” and “1234”, the output string should be “1290”
If input strings are “123456732128989543219” and “987612673489652”, the output string should be “123457719741663032871”

...