Now that we developed the algorithm for finding the hottest hour, we're gonna write the code. So, I've already set up the class for us with the imports that we're used to having and the class name and the method that we're gonna write is this hottestHourInFile and we're gonna start the process with the pseudocode that we developed by the end of the last video. So at first, it says, start with the largest so far as nothing. So we now know that nothing in Java is represented as null, so I'm gonna go ahead and set largestSoFar, I'm gonna give it an initial value of null. So now, it starts out with null as its initial value and it's a CSVRecord, which is what we're planning to return. And then I'm gonna come down, it says for each row in the CSV file, and that again is our Familiar pattern of iteration that we've been using throughout this course and we're going to use the parser that's been passed in as the parameter, as the CSV information that we're Looping over in the iteration. And I'm gonna go down to the bottom here and go ahead and close this loop, so that, again, I have the idea of what I'm gonna do for each record as we iterate over it. Next, it says, if the largestSoFar is nothing. So this is the first time that we've seen it and we're gonna check to see if largestSoFar is null. And again, this is just like we saw in the last video. We're checking to see if the value was null. If it is, we're going to assume that the current temperature, the current record is the hottest one. So we will call that currentRow or we'll assign that largestSoFar gets currentRow. That's all we have to do for that if statement, we're just replacing it. Otherwise and that means else in Java, I'm gonna compare the two temperature values directly. That means I need get those temperature values out of the record. I know that those values are going to be numbers and I have decision to make sure that they be integers home numbers and they should be double real numbers. That's right, they should be doubles. Because one of the temperatures was 30.9 in our example and that's a real value number, which is better represented as a double. So I'm gonna set currentTemp = CurrentRow.get("TemperatureF"), but getting that value is gonna give me a string and what I really need is a number. So I need to convert that string from a string into a double, so I'll use that. I'll use Double.parseDouble to make that happen, then because I need to do the exact same thing again, I'm just gonna go ahead and paste that line and I'm gonna call this largestTemp and I'm gonna get it from largestSoFar. And now, I have two double values and I can compare them directly. So, I'm gonna check if the currentTemp is greater than the largestTemp. And if it is, then I'm going to replace that value. The one in largest. So I'm gonna say, largestSoFar get currentRow. So I've replaced it in the two cases that we have checks for and I'm done with my pseudocode for inside the loop and I'm gonna move to the next line, which is outside the loop. And it said, the largestSoFar is the answer, so I'm gonna return largestSofar. Now I'm gonna compile my code, just to make sure I haven't made any silly errors. It says, no syntax errors. So now, I'm ready to test my code.