For example, in NetBeans, you don’t have to write the left-hand side in assignments when you’re calling a method. Just write this:
Move the caret inside indexOf, the method name, and type Alt-Enter. Assuming you’re calling a method that has a return value, and you’re not already reading the return value, NetBeans will generate the left-hand side of the assignment — including the type declaration — for you:
String indexOf = "foo".indexOf("o");
Advice to students? I got a lot out of it.