Advertisement
karbaev

practice5

Jun 29th, 2016
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.24 KB | None | 0 0
  1. public class strcmp {
  2.     public static void main(String[] args) {
  3.         String s1 = "ABC";
  4.         String s2 = new String("DEF");
  5.         System.out.println(s1.compareTo(s2)); //результат "-3", потому что...
  6.     }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement