Hi I have one synchronized method which returns ms. Can anyone tell whether where each object will get the unique value in below code.
public static synchronized Long generateIdforDCR()
{
int val= return System.nanoTime();
}
Call will be in another class like
forloop 1... 1000
{
ClassName cn=new ClassName();
cn.generateIdforDCR();
}
Will i get unique value always.