Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quick way to insert the Java 'for' loop in Eclipse

Tags:

java

eclipse

Is there a (quick) way to automatically insert the Java for loop, for example, for (int i=0;i< someInt;i++){ ?

It would be very convenient (as rest of code generation functionality).

like image 708
ps-aux Avatar asked Sep 12 '13 18:09

ps-aux


People also ask

What is the shortcut for for loop in Java?

Java 5 introduced an for-each loop, which is called a enhanced for each loop. It is used to iterate over elements of an array and the collection. for-each loop is a shortcut version of for-loop which skips the need to get the iterator and loop over iterator using it's hasNext() and next() method.

What is shortcut for system out Println in eclipse?

To get System. out. println() line in eclipse without typing the whole line type sysout and press Ctrl + space.


1 Answers

Type for and then hit Ctrl + Space.

like image 99
jmj Avatar answered Oct 04 '22 01:10

jmj