Tag: java

RegEx to match Java Comments

RegEx to match Java Comments

Most(if not all) of the regular expressions a developer needs is already available. There are numerous resources online ranging from blogs and even an ever growing library. Not to mention the endless discussions on stackoverflow.

Few days back, I had lost the sources to a project and had to decompile them from the original build. Did not expect the decompiler to throw in so much comments.

String intern() function and String Pool

String intern() function and String Pool

The Java programming language requires that identical string literals (that is, literals that contain the same sequence of code points) must refer to the same instance of class String. In addition, if the method String.intern is called on any string, the result is a reference to the same class instance that would be returned if that string appeared as a literal.

renderSnake – Better Way to create HTML

renderSnake – Better Way to create HTML

We live in an age where everything is open and innovations spring out every second. All those algorithms, all those concepts and all those frameworks are easily avalable to he who is willing to look. Unless you are not staring down from the tip of the cutting edge, you can pretty much get help on any problem. If someone had a similar problem before and you have the solution available, why re-invent the wheel..

A Requiem for Marker Interfaces

A Requiem for Marker Interfaces

Having written about Java serialization previously, I thought I’d put in some research into the concept of ‘Marker Interfaces’ or ‘Tag Interfaces’. Well, getting matters straight, technically, the word ‘Marker’ is an invention of bloggers and technical writers. Java specification says nothing about an interface being a ‘Marker Interface’. You won’t find the word ‘Marker’ at all..