Question: CHALLENGE ACTIVITY 2 . 2 . 2 : Linked list negative values counting. Assign negativeCntr with the number of negative values in the linked list.
CHALLENGE
ACTIVITY
: Linked list negative values counting.
Assign negativeCntr with the number of negative values in the linked list.
Learn how our autograder works
y
currobj headObj; Print the list
while currobj null
System.out.printcurrobjgetDataVal;
currobj currobj.getNext ;
System.out.println;
currobj headObj; Count number of negative numbers
while currobj null
Your solution goes here
currobj currobj.getNext ;
System.out.printlnNumber of negatives: negativeCntr;
View your last submission
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
