In reply to Yash_wanth12345:
class temp;
int array[15] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,8};
int q1[$];
int q2[$];
int q3[$];
function void post_randomize();
array.shuffle();
q1 = array[0:4];
q2 = array[5:9];
q3 = array[10:14];
endfunction
endclass