Java Tutorials, Tips & Tricks
Java is a programming language originally developed by Sun Microsystems and released in 1995 as a core component of Sun Microsystems’ Java. It is platform independent.
If you are using Eclipse as your primary development IDE, then you may want to know about Code templates in Eclipse. Code templates are certain user defined (some are available by default) templates which can assist in rapid code writing. Not only code templates increase your code writing speed, but it also add consistency across the code.To add a code template, all you need to ...
Ever wanted to hide all those closed projects in eclipse? Well, here is a simple trick that you may not know already.Imagine your Eclipse workspace is filled with many projects that you created in past just to test some small functionality. Now you are done with these projects and hence you have closed it. Eclipse by default show all the closed projects in Project ...
iText is a wonderful library if you want to generate PDFs in Java. It comes with a huge set of API to create/manage a PDF file. We already saw in our previous tutorial
how to generate a pdf file in itext and also
how to merge ...
Quote 1: Avoid creating unnecessary objects and always prefer to do Lazy Initialization Object creation in Java is one of the most expensive operation in terms of memory utilization and performance impact. It is thus advisable to create or initialize an object only when it is required in the code.public class Countries {private List countries; public ...
The European Commission on Thursday approved Oracle Corp.'s acquisition of Sun Microsystems after regulators were assuaged over the fate of an open-source database, James Gosling have paid respect to Sun Microsystem on his
blog. Please go to his blog and pay your respect to Sun.
Synopsis This note deals with AMQP, and some implementations, especially Qpid and ActiveMQ.Introduction AMQP stands for Advanced Messaging Queuing Protocol. It is a standard for cross platform messaging. It is a wire protocol and aims to enable functional compatibility between clients (from various platforms) and messaging brokers.It is pretty comprehensive and aims to cover all distributed business scenarios. ...
Synopsis This note describes a few simple commands on how to view the RAM and CPU usage of your Java process. It provides brief pointers on how to identify the influencing parameters and how to tweak it.Memory Java Heap The heap size of your Java process can be controlled by using a combination of –Xmx and –Xms. The heap size ...
Java Properties files are amazing resources to add information in Java. Generally these files are used to store static information in key and value pair. Things that you do not want to hard code in your Java code goes into properties files.Although there are multiple ways of loading properties file, I will be focusing on loading the resource bundle files from class path resources. ...
Inner classes, also called Nested Classes, are nothing but classes that are defined within other classes. The nesting is a relationship between classes, not objects.Inner classes have clearly two benefits, name control & access control. In Java, this benefit is not as important because Java packages give the name control.Java inner classes have feature that ...
Update: This feature has been removed from the final feature list that is being included in Java 7. Thanks @Stephen and @Stefan for the comments. Please refer to
Project Coin for more details.NullPoniterException is one of the most common exception encountered in Java programming. When I searched "NullPointerException" in Google, it gave about ...