I am writing some code that gives me a random string of numbers, they need to list under on integer but each number needs to be under a different math.random. For Instance, if two separate number are listed like 5 and 7, I don't want it to print 12, I would like it to print 57. But i don't want to use the System.out.println(Number1+Number2); way.
I have tried using the "&" Sign multiple ways but none seem to work.
int Number1 = 1 + (int)(Math.random() * ((5) + 1));
int Number2 = 1 + (int)(Math.random() * ((5) + 1));
int Number3 = 1 + (int)(Math.random() * ((5) + 1));
int finalcode=Number1&Number2&Number3;
System.out.println("Promo Code Genorator:");
System.out.println(" ");
System.out.println("Your Promo Code Is: "+finalcode);
Instead, what happens is it picks the lowest number from there and prints them. Any Ideas?