max and min has a validator issue. I was getting the correct output but I set max = Integer.MIN_VALUE and in their solution they just set both to the first element of the array. My solution worked but their validator didnt like it for some reason.
in the maximum and minimum numbers task, there's no reason not to determine the max and min in the same loop in which they are entered, yet the validator doesn't like it :/
shuffled just in time, im here so far:
father
mother
son
daughter
cat
dog
program
car
father
mother
son
daughter
when i :
for (int i = 0; i<m; i++){
list.remove(i);
}
it removes every 2nd line, why?:
mother
daughter
dog
car
father
mother
son
daughter
Justin SmithLevel 41, Greenfield, USA, United States
11 July 2021
"Be sure that you just display the array in reverse order. You don't need to reverse the order of the elements in the list."
I don't understand this bit. How do you display an array (or arraylist) in reverse order without reversing the order of the elements? That sounds a bit like saying "paint the house red, but you don't need to paint the house red."
task0719 (Display numbers in reverse order) caveat: you will get failed if you use anything other than an ArrayList<Integer>, even though that requirement is not stated anywhere and this is not really an appropriate structure for the job.
Cat code won't compile exercise gives
java.lang.NullPointerException even when I download the correct solution and it passes testing.
I tried while(true){
String name = reader.readLine();
int age= Integer.parseInt(reader.readLine();
int weight=Integer.parseInt(reader.readLine();
int tailLength=Integer.parseInt(reader.readLine();
then pass these values to the constructor.
But it keeps giving me NumberFormatException
Don't know what is wrong with this but got an answer that I am trying to convert null to int.
Shuffled Just in Time...I don't really understand what this means: Move the first M strings to the end of the list.
Does it mean that for the sample data the output would be (move the first four to the end in order)...
cat
dog
program
car
father
mother
son
daughter
??
GO TO FULL VERSION