Archive

Archive for the ‘Java’ Category

my custom theme settings for IntelliJ IDEA

March 27th, 2017 No comments

Hi guys!

Would you like to have an appearance like this on your IntelliJ IDEA?

(This works fine for both Community and Ultimate version).

Screen Shot 2017-03-28 at 00.24.58

Download the JAR file here: https://drive.google.com/file/d/0B0PQXRyV7ZBrSlRxR1lzUURVS1U/view?usp=sharing

 

How to use?

It’s really easy. Go to “File” -> “Import Settings“, browse and open up the downloaded JAR file.

Restarting IntelliJ IDEA. Enjoy!

For TextView android

July 11th, 2016 No comments

 

Categories: Android, Java Tags: ,

Socket in Java

July 8th, 2016 No comments
Categories: Java Tags: , ,

An example for using Interface in Java

July 7th, 2016 No comments

This simple project demonstrate the use of Interface in Java. Go here

Categories: Java Tags: , ,

“Static initializer” in Java

July 6th, 2016 No comments

See the following picture, then go ahead and take a look on the explanation at the end.

2016-07-06_23-18-35

Looking at the picture above, you can see a static block in JavaApplication class. It has no return statement, no argument, no this or super here.

This static block is a “static initializer”, It’s automatically invoked when the class is loaded on the first times (and ONLY ONE) by virtual machine, and there’s no other way to invoke it.

This static block and default constructor are not the same, the constructor will be called everytime we initialize a class. But, the static block  will be called in once (look at the picture).