abcdeの末尾がeならokと出力したいのですが
↓では期待通りにならないのですが
どうしたら上手くいくか教えて下さい。

String word= "abcde";

if(word.matches("e$"))System.out.println("ok");