What is console program in Java and how to write one?

My questions are:

  1. What is an interactive console program in JAVA and how do I write one ?
  2. What are the differences between a normal java code and a console program?
  3. When and why we should use a console program?
  4. How could we write println without system.out and readint without any scanner? As written in the solution?
  5. Please explain the following solution

Question from my friend: Write a console program too convert feet and inches into cm.

The solution I got from my friend:

       println("This program converts feet and inches to centimeters.");
	int feet = readInt("Enter number of feet: ");
	int inches = readInt("Enter number of inches: ");
	double centimeters = ((feet * 30.48) + (inches * 2.54));
	println(feet + "ft " + inches + "in = " + centimeters + "cm");