Computer Science, asked by jakeumi, 1 year ago

......n=in.nextInt();....... what does this function do in java programs​

Attachments:

Answers

Answered by mjha99
0
its function is to accept a number from user and store it to the variable assigned to it..
Answered by Anonymous
0

Answer:

The statement is used for taking inputs .

The statement reads the next token as an integer type value .

Explanation:

Example is :

int s=sc.nexInt();

The next token entered by the user will be accepted as integer .

If the next token is not an integer input mismatch exception error will occur .

The token is the smallest individual unit of a JAVA program .

Similar questions