0

Im kind of new in Java so I will highly appreciate your help! I am developing an app that allows users to register air crafts information (as many as they need). However, the app needs to assign a random ID to each of the air crafts registered by the user in the following A-LLLL-NNNN-2018, where:

  • A is a static value.
  • LLLL is a random series of letters.
  • NNNN is a random series of numbers.

I was thinking of using a random array including the alphabet but I'm not really sure how the to do the string of the ID, Any help will be highly appreciated!

The difference of my questions versus the other questions is that in my case, I need to assign each ID randomly created to the objects I have created and the format has to be specifically as described above.

yego_456
  • 1
  • 3
  • Using the approach in the duplicate answer, create two random strings with different "alphabets": one of letters, one of digits. Create the complete identifier by concatenating your static text with these components. – erickson May 23 '18 at 20:15
  • I appreciate your suggestion, and it makes total sense.. I am currently working on it! – yego_456 May 23 '18 at 21:10

0 Answers0