ERROR: null
java.lang.NullPointerException
at ficheros1.Fichero1.main(Fichero1.java:36)
BUILD SUCCESSFUL (total time: 0 seconds)
package ficheros1;
import java.io.*;
public class Fichero1 {
public static void main(String[] args)throws Exception {
FileReader fr = null;BufferedReader br = null;
FileWriter fw1 = null;BufferedWriter bw1 = null;PrintWriter pw1 = null;//consonantes
FileWriter fw2 = null;BufferedWriter bw2 = null;PrintWriter pw2 = null;//vocales
FileWriter fw3 = null;BufferedWriter bw3 = null;PrintWriter pw3 = null;//Híbrido
String caracter;
try{
fr=new FileReader("C:/PruebasNetbeans/entrada.txt");
br=new BufferedReader(fr);
fw1=new FileWriter ("C:/PruebasNetbeans/salida1.txt");
fw2=new FileWriter ("C:/PruebasNetbeans/salida2.txt");
fw3=new FileWriter ("C:/PruebasNetbeans/salida3.txt");
pw1=new PrintWriter (fw1);
pw2=new PrintWriter (fw2);
pw3=new PrintWriter (fw3);
caracter=br.readLine();
Palabra pal = null;
while(caracter != null){
if (pal.soloVocales(caracter)){
pw2.print(caracter);
}
if (pal.soloConsonantes(caracter)){
pw1.print(caracter);
}
else if(pal.soloConsonantes(caracter)&&pal.soloVocales(caracter)){
pw3.print(caracter);
}
}
}catch (Exception e) {
System.out.println("ERROR: " + e.getMessage());
e.printStackTrace();
}
}
}
GRACIAS DE ANTEMANO!

