Question: In Java without Arrays // Question 16: if two strings, s1 and s2, // represent positive integers in the usual way, // as sequences of

In Java without Arrays

// Question 16: if two strings, s1 and s2,

// represent positive integers in the usual way,

// as sequences of digits, is it true that

// s1.compareTo(s2) is always the same sign as

// the sign of (s1 - s2)? Yes, it is.

//

// Fill in the following method that prompts the

// user to enter two strings and tests this

// hypothesis. Use the method in the main

// method of this class to experiment with

// different answers and then fill in the blank

// (in main, below) with your answer

public static boolean q16test(String s1, String s2)

{

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!