0
I need help for this scanner input
hello i tried this code but i got lots of error ...please help public static void main(String[] args){ String input ="1 wine 5 white wine red wine"; try (Scanner s = new Scanner(input).useDelimiter("\\s*wine\\s*")) { System.out.println(s.nextInt()); System.out.println(s.nextInt()); System.out.println(s.next()); System.out.println(s.next()); } } }
1 Answer
+ 1
import java.util.Scanner