Taking Input in Java

Get Into Code provides you with free C++ and Java Course in Hindi/Urdu and also provides you the opportunity to practice your skills to be perfect. In the previous video we have discussed about the Programming Style for Java. In this video we are going to discuss about Taking Input in Java
User Interaction
In most cases we have to take input from user for your program. For instance if you have made the program to find the square of the number then you have to take input from user so that you can find the square of whatever the number has been entered by the user. Almost every programs need user interaction. To get input from user you have to write System.out.println followed by left parenthesis ( and the variable name in which you have to store the input. At the end you have to put right parenthesis ) and semicolon to end the Statement.
Syntax
System.out.println(Variable_Name);

Watch The Video Below to Know About on User Interaction in C++


The best about our site is that we provide our readers to practice their skills because Practice Puts Brain in Your Muscles. So, Go Ahead and Write a Java Program which take two numbers from user and program will find their product and print it.
Respected output will be as
First number= 12
Second number=10
Product=120

No comments

Powered by Blogger.