ITEC 1620 Lecture Notes - Lecture 4: Standard Streams, Enumerated Type, String Literal
Document Summary
An object is something that has a state, which is defined by the values of its attributes also called instance variables. it also has behavior which is defined by its methods. A class is a blueprint from which objects are created. When creating programs it is often useful to read data from the user interactively during the execution. In this way new results can be computed each time the program is run, depending on the data that is entered. The scanner class is part of the application programming interface (api) and provides several methods for reading input values of various types. The input could be from the user or it could be from a file. Inorder to use this class we must first create a scanner object so that we can invoke its methods. To create an object in java we use the keyword new followed by the class name.