Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros entornos y lenguajes > JAVA
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 25-05-2004
pedromanuel pedromanuel is offline
Registrado
 
Registrado: may 2004
Posts: 6
Poder: 0
pedromanuel Va por buen camino
Funcion de tiempo

Hola me gustaria poder utilizar la funcion Time de java, pero no se muy bien como utilizarla.


Esto es lo que viene en la APIS, pero no soy capaz de usarlas:

Time(long time)
Constructs a Time object using a milliseconds time value
.
Time
public Time(long time)
Constructs a Time object using a milliseconds time value.
Parameters:
time - milliseconds since January 1, 1970, 00:00:00 GMT; a negative number is milliseconds before January 1, 1970, 00:00:00 GMT
Lo he intentado de las siguientes formas pero ninguna de ellas me funciona:

1. long tiempo;
long numero=100;
tiempo.Time(numero);
ERROR: Tiempo.java:24: long cannot be dereferenced
fecha.Time(numero);

2. long tiempo;
long numero=100;
tiempo=Time(numero);
ERROR:Tiempo.java:24: cannot resolve symbol
symbol : method Time (long)
location: class Tiempo
fecha=Time(numero);
3. long tiempo,fecha;
long numero=100;
fecha=tiempo.Time(numero);
ERROR:Tiempo.java:25: long cannot be dereferenced
fecha=fecha2.Time(numero);

4.tiempo = new long[10];
long numero=100;
tiempo=Time(numero);
ERROR: Tiempo.java:19: cannot resolve symbol
symbol : variable fecha
location: class Tiempo
fecha = new long[10];
^
Tiempo.java:24: cannot resolve symbol
symbol : variable fecha
location: class Tiempo
fecha=Time(numero);
^
Tiempo.java:24: cannot resolve symbol
symbol : method Time (long)
location: class Tiempo
fecha=Time(numero);
^
3 errors



No se me ocurre como hacerlo.

Muchas Gracias
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 12:29:24.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi