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

My questions are:

What is an interactive console program in JAVA and how do I write one ?
What are the differences between a normal java code and a console program?
When and why we should use a console program?
How could we write println without system.out and readint without any scanner? As written in the solution?
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));

@amansagar1901 interactive console program is a type of program in which you specify everything on Console like if you want user to enter No. of balls then You will print in console “No. of balls” and then you will take input from user. It is also java code but with some more SysO Statements.The solution your friend has given is not right bcoz to use readInt() you have to make a DataInputStream class which is same as using Scannner. SO. MAKE SIMPLICITY A NEW NORMAL means it is advised to use the classes and Function which have been taught in your course bcoz they are universally accepted.

As per normal, I do create and use classes and functions. But three to four days ago, I tested my code using the same conventional manner. The conversion was incorrect. And a friend of mine gave me a solution that was absolutely correct: the answer is 180.34cm when we enter 5 feet, 11 inches. However, my result wasn’t 180.34cm; it was something different. Could you kindly provide an answer to this query?

@amansagar1901 Send me the conventional code you used.

see these photos. Also I asked about a question twice for solution. When will you give me the solution for that? It also has the code. Do I have to ask again? I have sent it via the ask doubt as it was said to me.

Please look into this issue this issue as well and share your insights with me.
Thanks!

@amansagar1901 Conversion of inches to cm is 2.54 not 2.48 Change 2.54 to 2.48 Everything is fine.

@amansagar1901 Talking about your separate question for the solution You havent asked from the asked doubt section you have asked that directly from Discuss Block. So It is requested to Ask Accordingly

yeah I found that nevermind. I took you a while to reply I found the solutions myself.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.