Programming Basics – Addendum: IntelliJ QuickTip

Our last series was a big success and we decided to take it a step further with an Advanced Programming series, which will start in Dec. 2016. But for today I want to give you a quick tip for faster coding in IntelliJ IDEA!When you are coding, there are some constructs that you might type more than once. Let’s say the main-method. Each Java program needs one, or the System.out.println()-call, which might be a method you call very often. IntelliJ (as well as other IDEs) have handy features, so you do not have to write these constructs manually each time you need them. For example:

If you type in sout in a valid context (inside a method) and press enter immediately after entering it, IntelliJ will substitute “sout” with:

System.out.println("");

Look at this short video if you want to see this feature in action!

These keywords are called live templates in IntelliJ and you can list all available keywords with the Ctrl + J (Cmd + J on Mac) shortcut. You can read more about live templates in the official documentation.

And the best thing is: If you have a code snippet that you use often, you can define your own macros! Learn about that feature here.

Hopefully this tip helps you and speeds up your coding! Have a nice Monday!

comment-banner

Advertisements

12 thoughts on “Programming Basics – Addendum: IntelliJ QuickTip

  1. Have you ever thought about including a little bit more
    than just your articles? I mean, what you say is important and everything.
    However think of if you added some great graphics or videos
    to give your posts more, “pop”! Your content is excellent but with images and videos, this
    website could definitely be one of the best in its
    field. Awesome blog!

    Liked by 1 person

  2. I am captivated by this insightful article.
    There are actually many things mentioned here I had never thought of before.
    You have made me realize there is more than one way to think about these things.

    Liked by 1 person

  3. Buenas. Tengo 37 años y estoy aprendiendo inglés hará unos 8 años.
    Este comentario me ha parecido memorable para la formación en el inglés.
    Me ha sido muy conveniente. Lo voy a aumentar a mis
    favoritos. Te doy las gracias por el comentario.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s