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.

Eclipse Tip: Add your own Code Template in Eclipse

Eclipse Tip: Add your own Code Template in Eclipse
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 ...

Eclipse Tip: Hide Closed Projects in Eclipse Project Explorer View

Eclipse Tip: Hide Closed Projects in Eclipse Project Explorer View
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 ...

Generate Pie Chart/Bar Graph in PDF using iText & JFreeChart

Generate Pie Chart/Bar Graph in PDF using iText & JFreeChart
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 ...

10 Most Useful Java Best Practice Quotes for Java Developers

10 Most Useful Java Best Practice Quotes for Java Developers
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 ...

R.I.P Sun: James Gosling paying Respects

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.
Tags:

Advanced Messaging Queuing Protocol: A Short Note

Advanced Messaging Queuing Protocol: A Short Note
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. ...

Simple Guide To Understand Resource Profile of Java Application

Simple Guide To Understand Resource Profile of Java Application
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 ...

Loading Java Properties Files

Loading Java Properties Files
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 in Java, the mystery within.

Inner classes in Java, the mystery within.
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 ...

Null-safe Type in Java 7: New way to handle NullPointerException

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 ...
Page 2 of 612345...Last »
Copyright © 2012 ViralPatel.net. All rights reserved.