public long maxProductOfConsecutiveDigits(String number, int nDigits){
		long product =1;
		long maxProduct = 1;
		int count = 0;
		int maxDigits = number.length();
		
		for (int i=0; i<nDigits;i++){
			if (i<maxDigits){
				String str = number.substring(i,i+1);
				if (!"".equalsIgnoreCase(str)){
					int digit = Integer.parseInt(str);
					product = product*digit ;
					count = count + 1;
				}
			}
		}
		
		maxProduct = product;
		while (count < maxDigits){
			int nextDigit = Integer.parseInt(number.substring(count,count+1).toString());
			int prevDigit = Integer.parseInt(number.substring(count-nDigits,count-nDigits+1).toString());
			product = product*nextDigit;
			if (product!=0)
				product = product/prevDigit;
			else
				product = maxProductOfConsecutiveDigits(number.substring(count-nDigits+1, count+1),nDigits);
			
			if (product > maxProduct){
				maxProduct = product;
			}
			count = count + 1;
		}
		
		return maxProduct;
	}