The image shows three rectangle:
Blue - instruction given by codecademy
Yellow - The same instruction applied by me
Red - The output result not coming as per shown in Blue Rectangle
When I search online for solution the code is missing one line which is while printing out onlyPrime array it needs to be stored in ArrayList for the expected output to be in array format
solution:
ArrayList primeNumbers = pd.onlyPrime(numbers);
System.out.println("Prime numbers: " + primeNumbers);
“PLEASE LOOK INTO THIS AND LET ME KNOW IF ANYONE OF YOU HAS FACE THIS ERROR OR AM I DOING SOMETHING WRONG”