1
Answer

implementing a class

Ask a question

implement  a class Position containing:
-A static method public static ArrayList identifyPosition (int val,int [] tab) that returns an ArrayList containing all the positions of the value val of the array tab.
example: if tab is {2,0,-1,2,3,5,4,2,5} and val=2 then the method returns the ArrayList {0,3,7} that are the index of the value 2 in the array tab.


 

 


Answers (1)