Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class strcmp {
- public static void main(String[] args) {
- String s1 = "ABC";
- String s2 = new String("DEF");
- System.out.println(s1.compareTo(s2)); //результат "-3", потому что...
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement