设字符串变量str1="abc";str2="defg";则str1.compareTo(str2)的返回值为()
A:2
B:-3
C:3
D:-2
出自:计算机科学