String nameLc = name.toLowerCase();
If(nameLc.endsWith() || nameLc.endsWith()....)

is better than call name.toLowerCase() 6 times.