Netbeans 6.1 is able to automatically assign a return value and create a variable for you. This is really convenient. To try it out do the following:
- Type e.g. new java.util.Date(); (or new Date() with strg+space -> it will import it for you), or invoke an arbitrary method with a return value (e.g toString()).
- Then go with the cursor to Date() (or the method).
- You should see a yellow bulb on the left. Either click on the bulb, or click alt+enter.
- Netbeans should suggest you: "Assign Return Value To New Variable" just press Enter.
- Netbeans will create a variable, derive the name and the type. The end result is: Date date = new Date();
Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition
airhacks.fm the podcast:
Stay in touch: airhacks.news.