How to input From user in Java Programm ?????

you have to must know about the function.

this function are built-ed function not user define function in java.

first of all you have to include this function if you wanna take input from user

import java.util.*;
and also we also need a scanner statement

Scanner in= new Scanner(System.in);
and input get function are following

for integer:
a=in.nextInt();
for float:
a=in.nextFloat();
for double:
a=in.nextDouble:

for string :

a=in.nextLint();

for character you have add a main function to get input in character form
that's why we will discuss it later....

0 comments:

Post a Comment