I created one class :
public class CreateAccount {
public static Date dNow = new Date();
public static SimpleDateFormat WebsiteURL = new SimpleDateFormat ("E'-'yyyy'-'MM'-'dd'-'hh'-'mm'-'ss'-'a");
public static final String DummyTime = WebsiteURL.format(dNow);
public static void main(String[] args){
WebDriver driver = new FirefoxDriver();
.
.
.
.
.
}
and tried to save the WebsiteURL in a final object (DummyTime) in order to use it from another class :
public class SendMessage extends CreateAccount{
public static void main(String[] args) {
System.out.println(DummyTime);
}
The problem i have its that every time i call sendMessage , the value dummyTime prints changes. How can i store the WebsiteURL in a const variable that will exept one date and wont change it in the future?