Let’s start with input and output operations

INPUT

READING NUMBERS FROM THE KEYBOARD

Any information or data sent to a computer for processing is considered input. Input or user input is sent to a computer using an input device. The picture is an illustration of the difference between input and output.

An easy way to get data input into the program, is to create a Scanner object.

OUTPUT

Data generated by a computer is referred to as output. This includes data produced at a software level, such as the result of a calculation, or at a physical level, such as a printed document.

A basic example of software output is a calculator program that produces the result of a mathematical operation.

TYPE CONVERSION

TYPE CONVERSION RULE

  1. If one of the operands is double, the other is converted into double.
  2. Otherwise, if one of the operands is float, the other is converted into float.
  3. Otherwise, if one of the operands is long, the other is converted into long.
  4. Otherwise, both operands are converted into int.

TYPE CASTING

Typecasting, or type conversion, is a method of changing an entity from one data type to another. It is used in computer programming to ensure variables are correctly processed by a function.

Thanks for reading so far. I will continue my Java journey in the next article.

Software Developer | my universe: https://twitter.com/NightmaresTown