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
.Although SQL is a language, you don’t use it to write applications? (true, false)
Olin [163]

Answer:

The correct answer for the given question is true .

Explanation:

SQL is an Structural query language that is used for accessing the database basically it is an query language which is used for communicating with database by executed the query .

The following are the function of SQL  

SQL can insert the data into database

it can update the record into database

SQL can retrived the database.

We do not use SQL for writing application it is only used to accessing the database  

For create application we can use programming language Like PHP,ASP,JAVA ,PYTHON.etc.

3 0
3 years ago
Despite the rise of messaging apps and other forms of social media, these efforts are focused on consumer efforts, with corporat
miss Akunina [59]

Answer:

False

Explanation:

In our current market, we can find some messaging apps and social media designed for corporation organization setting. One example of messaging apps widely used in corporate world is Slack. The Slack enable user to set up different communication channel with their colleagues and flexibly set their working status.

FB also releases a corporate version of social media which is Workplace. The main attracting point is the contents are ad-free and you can expect to see company update or department news from the nesfeed.

4 0
3 years ago
The act of illegally copying software, music,or movies that are copied protect?
miv72 [106K]
It’s protects piracy C
4 0
3 years ago
Read 2 more answers
For anyone who plays warzone, do you think the hdr has earned its spot back after the spr nerf? Be completely honest plz.​
qwelly [4]

Answer:

Yes I do honestly : )

What about you ??

Explanation:

Hope this helped : )

Since I was the first one may i have brainiest : )

8 0
3 years ago
What is Roko's Basilisk?
serious [3.7K]

Answer:

Roko’s basilisk is a thought experiment proposed in 2010 by the user Roko on the Less Wrong community blog. Roko used ideas in decision theory to argue that a sufficiently powerful AI agent would have an incentive to torture anyone who imagined the agent but didn't work to bring the agent into existence.

7 0
3 years ago
Other questions:
  • Robin maintains a web page for updating the metro timings in the city. He would like the website to display the present day's sc
    6·1 answer
  • Describe network in terms of the class computer lab
    14·1 answer
  • What is a way to Procter your social security number and other sensitive information from identity theft
    9·1 answer
  • Hypertext Markup language (HTML) version _____ added support for style sheets to give web designers greater control over page la
    12·1 answer
  • Write the definition of a function named quadratic that receives three double parameters a, b, c. If the value of a is 0 then th
    12·1 answer
  • Jody should select the
    5·1 answer
  • Assume you have an Access database with five different tables, including various pieces of information about your client base. Y
    9·1 answer
  • A central issue of public sharing is:
    13·2 answers
  • What is 2+2 I need to know hurry
    12·2 answers
  • what is the importance of familiarizing and understanding the cells rows and format tools in the microsoft cell​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!