• + 1 comment

    Right. I'm not asking to understand assembly. I'm asking for an understanding of how to use Scanner. I've tried and when I run the code, HackerRank says it's wrong.

    Here's the code:

    import java.io.; import java.util.; import java.text.; import java.math.; import java.util.regex.*;

    public class Solution { public static void main(String[] args) { Scanner scan = new Scanner(System.in); // use the Scanner class to read from stdin String inputString = scan.nextLine(); // read a line of input and save it to a variable scan.close(); // close the scanner

      // Your first line of output goes here
      System.out.println("Hello, World.");
    
      //Your second line of output goes here
      [NOT SURE WHAT TO DO HERE OTHER THAN CREATED ANOTHER System.out.println("info here!");
    

    } }