Java Pattern Questions