I have a problem and I need your help. We have two different classes.

class 1 :

```java
public class class1 {

    private String value = randomValue();

    public String randomValue() {
        int x = (1 + (int)(Math.random() * ((100000 - 1) + 1))) + (1 + (int)(Math.random() * ((90 - 1) + 1)));
        return String.valueOf(x);
    }

    public String getValue() {
        return value;
    }
}

```

---

class 2 :

```java
public class class2 {

    class1 c = new class1();

    public String valueClass2() {
        return c.getValue();
    }
}

```

The problem is that I want to get the value of X in the first class, so that I can use it in the second class.

Is there a clear way to do this? Thank you