We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Java
- Strings
- Java Strings Introduction
- Discussions
Java Strings Introduction
Java Strings Introduction
Sort by
recency
|
1256 Discussions
|
Please Login in order to post a comment
public static void main(String[] args) {
import java.io.; import java.util.;
public class Solution {
}
Hi this is the code i submitted and it passed all test cases, but i am confused as to why this line worked (A.compareTo(B) > 1). When i used the line A.compareTo(B) == 1 test case two kept on failing until i made this change by mistake i meant to write 0 (zero) instead of 1 (one).
import java.io.; import java.util.;
public class Solution {
}
import java.io.; import java.util.;
public class Solution {
}