How to interact with Java Scanner class (Atom editor)


#1

I am super newb with Java and I am trying simple codes with Atom editor (osx). Please, someone can help me to understand how can I interact with code with Atom?

I use Script package (Atom) to run the code (cmd+i).

For example if I use the Scanner class:

import java.util.Scanner;
public class Les {

public static void main(String[] args) {

String s;
Scanner in = new Scanner(System.in);
System.out.println(“Enter a string”);
s = in.nextLine();
System.out.println("You entered string " + s);
}
}

the output will be “enter a string”

Where I can insert the Strings?

Thank you


#2

It sounds like you have a question about how to use the script package. The Atom FAQ has information on how to contact the maintainers of any Atom community package or theme.