00:01
Now welcome to this lesson.
00:02
In this lesson we will write a java program that will let users repeatedly enter numbers until they enter a negative number.
00:09
We will keep track of the highest number that they have entered and we will print after that.
00:15
So we need the main method.
00:17
So public static void main.
00:24
Let's have the parameter.
00:28
There are a few things that we need.
00:32
First of all we need to hold the number.
00:35
So let it start from 1.
00:38
Then we need the result of the highest number.
00:44
Let it be equals negative 1.
00:47
We also need a scanner object so that the user can actually enter from the command line.
00:54
So say sc equals new scanner.
01:00
We have sustain .in.
01:04
So at this point we will say while the number is greater than zero, once user has now put in negative number, we will say the number equals to sc .nextinteger.
01:30
It would require user to put in an integer.
01:36
Alright...