What will be printed?
System.out.println("toothpicks".substring(5)); System.out.println("toothpicks".indexOf('t')); System.out.println("toothpicks".indexOf('t', 2)); System.out.println("toothpicks".charAt(5)); System.out.println("toothpicks".length()); System.out.println(3/4); System.out.println(23/4);
Write a Doubler class with the following:
Doubler d = new Doubler(2.5); System.out.println(d.next()); // prints 2.5 System.out.println(d.next()); // prints 5.0 System.out.println(d.next()); // prints 10.0 System.out.println(d.next()); // prints 20.0 System.out.println(d.next()); // prints 40.0 System.out.println(d.next()); // prints 80.0Etc.