Generating random email address with current timestamp

No problem! :grin:

Instead, let’s assume here that this is a one-off, and that you’re not trying to encapsulate this into a method for use elsewhere.

Try this:

String myEmailAddress = "thisismyaddress+" + System.nanoTime() + "@Gmail.com";
System.out.println(myEmailAddress);
2 Likes