No sè el por què me da error al compilar el siguiente codigo.
 
public class HelloWorld{
 
public static void main(String []args){
Pattern pattern = Pattern.compile("here");
Matcher matcher = pattern.matcher("input here");
 
while (matcher.find()) {
System.out.println(matcher.group());
}
}
}
 
 
ERROR
 
^ 
symbol: class Pattern 
location: class HelloWorld 
HelloWorld.java:4: error: cannot find symbol 
Pattern pattern = Pattern.compile("here"); 
^ 
symbol: variable Pattern 
location: class HelloWorld 
HelloWorld.java:5: error: cannot find symbol 
Matcher matcher = pattern.matcher("input here"); 
^ 
symbol: class Matcher 
location: class HelloWorld 
3 errors 
sh-4.3$ ^C 
 
A que se debe el error?
 
Gracias. 
   
 

