```
class Solution {
public int findLengthOfLCIS(int[] nums) {
if (nums == null || nums.length == 0) return 0;
int result = 1, temp = 1;
for (int i = 0; i < nums.length - 1; i++) {
temp = nums[i+1] > nums[i] ? temp + 1 : 1;
result = Math.max(result, temp);
}
return result;
}
}
```