```
public int findLengthOfLCIS(int[] nums) {
if(nums.length <= 1) return nums.length;
int j = 0, maxlen = 0, len = 1;
while(j < nums.length) {
if(j>0 && nums[j] > nums[j-1])
len++;
else
len = 1;
maxlen = Math.max(maxlen, len);
j++;
}
return maxlen;
}
```