Mik Mik - 1 year ago 62
Java Question

Using Java LocalTime.parse method

I am trying to write a simple program in Java.

import java.time.LocalTime;

public class test {
LocalTime openT;
LocalTime closeT;

public test(String ot, String ct) {

this.openT = new LocalTime.parse(ot);
this.closeT = new LocalTime.parse(ct);

When I hover over .parse NetBeans keeps telling me:

Cannot find symbol

symbol: class parse

location: class localTime

I searched high and low but I can't figure out what's wrong here...

Anybody can give me some hint?

Thank you.


Remove the new keyword. The parse method is static.