-1

how do I get line using kattio eg. hello a hello b I understand that String s = io.getWord(); will return me hello but I want to obtain hello a

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Aug 30 '21 at 08:10

1 Answers1

1

There's nothing in kattio that lets tyou do this, at all. My suggestion: Don't use it at all, there is nothing in it that you can't do better and easier with basic java tooling.

For example, with scanner:

Scanner s = new Scanner(System.in);
s.useDelimiter("\\R");

// and now it's ready, just:

String line = s.next();
int number = s.nextInt();
double v = s.nextDouble();

does exactly what you want given as input:

hello a b
20
18.21871287
rzwitserloot
  • 85,357
  • 5
  • 51
  • 72