Home>

Complete the comment part and

Answer the result displayed when you input 123 from the standard input.

public class RandTest {

public static void main (String args []) {

java.util.Random r = new java.util.Random ();

// Generate a Scanner that reads from standard input

int n = // Read the int value with the generated Scanner.

r.setSeed (n);

System.out.println (r.nextInt (100));

}

}
Please tell me the answer to this question

  • Answer # 1

    Answer the result displayed when you input 123 from the standard input.

    You can see it by actually building the code and executing it.
    If it's a collection of qualification questions, programming languages ​​aren't much studied or understood without the environment in which the program runs.

    It's not like a school exam or exam.

    Programming has no absolute answer.
    I can't use it when I remember only the answer.

    It's natural to learn the basics, but it's better to think about "what you are programming for". Was it something to ask here?