Java: How can i persist RandomStringUUID object at runtime
<p>Here is the scenario:
I have:</p>

<pre><code>public class RandomStringUUID {

    public RandomStringUUID() {
        final String uuidstring = UUID.randomUUID().toString().replaceAll("-", "");
    }


    public String getRandomStringUUID() {
        final String uuidst = UUID.randomUUID().toString().replaceAll("-", "");
        return uuidst;
    }
}
</code></pre>

<p>Where i am generating a Unique Value.</p>

<p>Then in :</p>

<pre><code>public class AddSingleDomain {

    public static RandomStringUUID RUUID = new RandomStringUUID();

    @Test
    public void addSingleDomain() {
        AssertJUnit.assertEquals(DomainsPage.getTitle(), "View Account");


        String randomUIDSeed = RUUID.getRandomStringUUID();

        System.out.println("Random Domanin Name Prefix: "
                + randomUIDSeed);
        System.out.println("Random Domanin Name Prefix: " + RUUID);


        getDriver().findElement(By.name("vo.zoneName")).sendKeys(
                randomUIDSeed + ".tv");
</code></pre>

<p>I use it, and then, yet in another class:</p>

<p>public class VerifyDBSingleDomain {</p>

<pre><code>String url = "jdbc:oracle:thin:@a.b.c.d:1521:ms";

@Test
public void VerifyDBSingleDomainTest()  {

    Properties props = new Properties();
    props.setProperty("user", "user");
    props.setProperty("password", "pass");


String sql = "Select zoneid from zone where zonename =" +  randomUIDSeed + ".tv";
</code></pre>

<p>I want to use the SAME VALUE "randomUIDSeed"
If in class VerifyDBSingleDomain i : String randomUIDSeed = RUUID.getRandomStringUUID();
would it be the same object ? How can i use this as same object, and hence guranteeing the same value across ALL classes during runtime.</p>
