|
|
|
|
37
|
* Make a method named `getOddEvensOfArray`
|
37
|
* Make a method named `getOddEvensOfArray`
|
38
|
* Method takes an argument of array of `Integer` objects
|
38
|
* Method takes an argument of array of `Integer` objects
|
39
|
* Method returns an object of type `OddEven` such that `OddEven` stores the number of `odds` and `evens` in the respective fields
|
39
|
* Method returns an object of type `OddEven` such that `OddEven` stores the number of `odds` and `evens` in the respective fields
|
|
|
40
|
+
|
|
|
41
|
+* Example of OddEven class
|
40
|
```java
|
42
|
```java
|
41
|
public class OddEven{
|
43
|
public class OddEven{
|
42
|
public int odds;
|
44
|
public int odds;
|
|
|
|
|
51
|
* insert an element into an array a specific position `insertIntoArrayAt`
|
53
|
* insert an element into an array a specific position `insertIntoArrayAt`
|
52
|
* find the maximum and minimum value of an array `findMaxMinOfArray` return a
|
54
|
* find the maximum and minimum value of an array `findMaxMinOfArray` return a
|
53
|
|
55
|
|
54
|
-* Example of MaxMin class
|
|
|
55
|
```java
|
56
|
```java
|
56
|
public class MaxMin{
|
57
|
public class MaxMin{
|
57
|
int max, max;
|
58
|
int max, max;
|