The conversation between human and AI assistant.
Write a programme to compare a two strings?
I'm using Java.
Great! Here's a sample Java code to compare two strings:

```
public static boolean compareStrings(String str1, String str2) {
    return str1.equals(str2);
}
```