File and Scanner: nextInt, next, nextLine, hasNext
Also on it
Integer.MINVALUE, Integer.MAXVALUE and Integer.parseInt.
Double.parseDouble.
Object's equals and toString.
Not on it
String methods such as charAt or toUpperCase: use substring.
Arrays and Collections helpers: write the loop.
Try 2 questions
Question 1
Consider the following code segment.String tag = "player_one_42";
int u = tag.indexOf("_");
String first = tag.substring(0, u);
String rest = tag.substring(u + 1);
System.out.println(first + " " + rest.indexOf("_"));What is printed as a result of executing the code segment?
Question 2
Consider the following code segment.double a = Math.sqrt(49) + Math.pow(2, 3);
int b = (int) Math.pow(10, 2) / 8;
System.out.println(a + " " + b);What is printed as a result of executing the code segment?