-5

I´m trying to do Chronometer in Java; is just for game.

I find this class in the Java API but I don´t know how I use it.

I try this code to create the Object of Chronometer, the compiler says "I cannot find the simbol "Chronometer" ". I think is because I need to import a specified librery to create a object for the Chronometer.

My problem is just to create the object for the class Chronometer; I know how use it for my objective.

Again, my question is how create the object of the class Chronometer, just it. Do I need a specified librery? Is not Chronometer a class that I can instance? How does Chronometer work ?

public class Timer{

private Chronometer cronos;


  public Timer(){
     cronos = new Chronometer();
  }

}

Thanks, Thanks for the help :P

PD: Sorry for the first version of the question, I wrote very fast and is my first time.

1 Answers1

1

First of all you need to add a new dependency to https://docs.oracle.com/middleware/1213/jdev/api-reference-esdk/index.html?oracle/javatools/util/package-summary.html.

Once you have added dependency, you wll get rid of compile time error I cannot find the simbol "Chronometer"

sauumum
  • 1,638
  • 1
  • 19
  • 36