System.currentTimeMillis()/1000;

 import java.io.*;

import java.lang.*;

import java.util.*;

/*

 * Write a description of class Hora here.

 * 

 * @author (Amalio) 

 * @version (v.0 7.5)

 */

public class Hora{

    /* instance variables - replace the example below with your own*/

    private int h;

    private int m;

    private long s;


    /*

     * Constructor for objects of class Hora

     */

    public Hora(){

        long s= System.currentTimeMillis()/1000;

        long m= h%3600;

        int h = (int) m%3600;

    }

    

    public String toString(){      

        String st = " "+s+" "+" "+ m +" "+ h; 

        return st;

    }

    

    public Hora(int h,int m, long s)

    {

        this.h = h;

        this.m = m;

        this.s = s;

    }

    

    

    /*

     * Constructor for objects of class Hora

     */

    public Hora(int h,int m)

    {

        this.h = h;

        this.m = m;

    }

    

   // public String toString(){      

     //   String st = " "+s+" "+" "+ m +" "+ h; 

       // return st;

    /

    

    /**

     * An example of a method - replace this comment with your own

     * 

     * @param  y   a sample parameter for a method

     * @return     the sum of x and y 

     */

    public static void main(String[] arg){

         

       Hora hora= new Hora();

        System.out.println(hora.toString());

    }

}

No funciona!!!!!!!!!!!!

Comentarios

Entradas populares de este blog

Mesa

Condolencias