If you are trying to learn, you should tell us which part you cannot figure out.
(If you are just trying to get answer for your homework, just Google and copy-paste.)
The first step should be to describe the approach for this problem in human language. For example:
For every letter, check if it is in the second word.
After doing this for all letters in the first word, are there any letters left in the second one?
Might want to just check the length at the start, then you can save some effort and won't need the last check.
After doing this in human language, it's time to convert it to Java. Post some details if you get stuck with that.
(For bonus points, note that something you may consider a letter, might not fit inside a character in Java. This may apply for Chinese characters for example. The solution will be more complex if you want to support those.)