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
BlackZzzverrR [31]
3 years ago
6

Which expression correctly determines that String s1 comes before String s2 in lexicographical order

Computers and Technology
1 answer:
Assoli18 [71]3 years ago
8 0

Options :

A.) s1 < s2

B.) s1 <= s2

C.) s1.compareTo(s2) == −1

D.) s2.compareTo(s1) < 0

E.) s1.compareTo(s2) < 0

Answer: E.) s1.compareTo(s2) < 0

Explanation: Lexicographical ordering simply means the arrangement of strings based on the how the alphabets or letters of the strings appear. It could also be explained as the dictionary ordering principle of words based on the arrangement of the alphabets. In making lexicographical comparison between strings, the compareTo () method may be employed using the format below.

If first string = s1 ; second string = s2

To compare s1 with s2, the format is ;

s1.compareTo(s2) ;

If s1 comes first, that is, before s2, the method returns a negative value, that is a value less than 0 '< 0', which is the case in the question above.

If s2 comes first, that is, before s1, the method returns a positive value, that is a value greater than 0 '> 0'.

If both are s1 and s2 are the same, the output will be 0.

You might be interested in
How to change screen resolution in windows 10?
pav-90 [236]
The easiest way is to hit the Windows icon on your keyboard, look for the Settings app, and look for screen resolution in the search bar.
7 0
3 years ago
4.7 code practice question 1 Edhesive
laiz [17]

Answer:

Following are the code to this question:

for x in range(11, 21):#defining for loop that use range method that take two integer values

  print(x," ")#print value

Output:

11  

12  

13  

14  

15  

16  

17  

18  

19  

20  

Explanation:

In the given question, it is not clear that what question is asked about and by search I show above so, I try to help you hope you like it.

In the above-given python code, a for loop is declared that use an x variable with the range method, that uses two integer value, in which first value will start the loop and last value ends the loop, inside the loop print method is used, that print the value of the loop variable x.

3 0
3 years ago
What should a good interface delight incorporate?
antoniya [11.8K]

<u>Answer:</u>  

A) a very long but detailed menu system

<u>Explanation:</u>

A <em>detailed menu will never attract or support the user in any form</em>. It might be difficult to use the application for longer time due to the <em>un supportive menu format.</em>

Option B: This option might look closer to the answer but it might not attract if many users are unaware of the latest changes.

Option C: The application should support and should not challenge the user. It is not a quiz or game show to challenge people.

Option D: Any GUI should be attractive so that the user tend to use it frequently.

8 0
3 years ago
Identify possible advantages and disadvantages of using automatic withdrawal to pay bills
Aleonysh [2.5K]

advantages. discounts, builds credit, helps keep track on when you need to pay.

disadvantages. could overcharge if it doesn't have enough, could ruin credit, could jeopardize future loans

5 0
3 years ago
Read 2 more answers
The _____ is responsible for managing ip addresses and internet domain names.
TiliK225 [7]
Internet assigned numbers authority (IANA for short).
4 0
3 years ago
Other questions:
  • Can a normal glass prevent eye issues like wearing anti radiation glasses?​
    8·2 answers
  • What parts of the computer does it not need to function?​
    9·1 answer
  • Charles would like to visit a specific page on the World Wide Web. How should he do it?
    10·1 answer
  • If you were looking for a record in a very large database and you knew the ID number, which of the following commands would be t
    10·1 answer
  • HELP ME PLZ QUICK Adam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guesses it took
    6·1 answer
  • Define application software​
    12·1 answer
  • Which category does this fall in identity theft​
    6·1 answer
  • What is the importance of charts and graphics in providing<br> information?
    15·1 answer
  • Create a set of functions that compute the mean, median, and mode of a set of
    8·2 answers
  • What function would you use to calculate the total interest paid for the first year of a mortgage?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!