Similar Posts

Subscribe
Notify of
3 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
regex9
11 months ago

For InOut is a class defined by the Java Editor (see here). This means that in other development environments (such as Eclipse, NetBeans, etc.), you can’t use them if you don’t copy this class definition explicitly into your project.

This class provides you with a few methods that allow you to read inputs from the console input channel or write outputs in the console output channel.

The method readInt first outputs the string (>=0) in the console. She then tries to read out the next input in the console and convert it to an integer. When this works, the number read is called into a variable Numberstored.

Lamanini
11 months ago

This is probably from an api that your teacher has given and provided.

The next integer, i.e. an integer, is probably read in by the standard input.

InOut is the (static) class, readInt is the method, and that in the quotes of the text that should be displayed when asked about the number.