I need to write a constructor which will generate a random 6 length char. i've used : code=UUID.randomUUID();
and i thought of using :
if (code.length() != 6 ) {
 code=UUID.randomUUID();
 }
but there is an error which says method lenght() is undefined for type UUID. What else can i do?
 
     
    