Java: array methods -


This code is assumed that an array of integers is examined for 9 and returns this frequency but the method validation Not getting. Any help please make this code work.

  public fixed int array COUNT9 (int [] nums) {int count = 0; For (Int i = 0; I  

Change your method call to:

 < Code> System.out.println (array number 9 (new int [] {1,2}});  

Optionally:

  int [] a = {1,2,9}; Println (arrayCount9 (a));  

The shortcut syntax {1,2,9} can only be used when an array type can be started if you want to do this signaling If you pass by one method, it will not be interpreted by the compiler as an array.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -