Foros del Web » Programación para mayores de 30 ;) » Java »

error otra vez

Estas en el tema de error otra vez en el foro de Java en Foros del Web. ya inicialice el fichero pero ahora me sale ilegal scape character que onda con eso krnales File fichero = new File ("c:\archivo"); ObjectOutputStream oos = ...
  #1 (permalink)  
Antiguo 02/05/2006, 08:02
 
Fecha de Ingreso: mayo-2006
Mensajes: 101
Antigüedad: 18 años
Puntos: 2
error otra vez

ya inicialice el fichero pero ahora me sale ilegal scape character
que onda con eso krnales

File fichero = new File ("c:\archivo");


ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(fichero));
for (int i = 0; i <5; i++)
{

altas_Clientes r = new altas_Clientes();
oos.writeObject(r);
oos.close();
  #2 (permalink)  
Antiguo 02/05/2006, 08:03
 
Fecha de Ingreso: mayo-2006
Mensajes: 101
Antigüedad: 18 años
Puntos: 2
ya vi me fataban comillas entonces ahi ya se guarda mi array??

public class clientes {


altas_Clientes alt = new altas_Clientes();
public clientes() {
}

public void altas(){
ArrayList lista=new ArrayList();
altas_Clientes alt = new altas_Clientes();

for (;;)
{

System.out.println("RFC del cliente: ");
alt.rfc=input("");
System.out.println("NOmbre del cliente: ");
alt.nombre=input("");
System.out.println("direccion ");
alt.direcc=input("");
System.out.println("telefono ");
alt.tel=input("");


lista.add(alt);


System.out.println("desea agregar otro registro si/no:");
String opt=input("");


if (opt.equals("no")){


File fichero = new File ("c:\"archivo");


ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(fichero));
for (int i = 0; i <5; i++)
{

altas_Clientes r = new altas_Clientes();
oos.writeObject(r);
oos.close();
}

}
  #3 (permalink)  
Antiguo 02/05/2006, 08:07
 
Fecha de Ingreso: mayo-2006
Mensajes: 101
Antigüedad: 18 años
Puntos: 2
ah y como le hago para leerlo????????????
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:45.