Optimizing The Java Programming Language Get the Trellian Seo Toolkit
Get our FREE SEO Guide
Subscribe to our newsletter to receive useful SEO tips, tricks, strategies, free ebooks that are available only to our subscribers and get this amazing SEO guide for free!

Your email is safe and will NEVER be shared with any other parties. And of course, you can unsubscribe at any time.

Name:
Email:
SEO Elite - #1 SEO Software

Who Else Wants To Finally Get A #1 Google Ranking In As Little As 7 Days... And Drive A Minimum Of 789 Unique Visitors To Your Websites Per Day?

25 Ezine Marketing PLR Articles with Master Resell Rigths

This package includes 25 high quality Ezine marketing articles with Private Label rights and Master Resell Rights

Only $4.95
Coming soon ...


Self SEO Store  
SEO forum
Website templates
Flash templates
Best hosting reviews.
Free Internet & IT Magazines.
Articles archive

Submit your article

Register
Login

Search
XML news feeds
Free RSS news reader
Contact


AddThis Feed Button

Optimizing The Java Programming Language

Posted by Gautam Dev on: 2005-10-28 17:51:09

Self SEO > Software Articles


Improving JavaBean Coding


The first thing I have is to improve the coding of any JavaBean. We all know any java bean has members and lot of getters and setters. But for large number of member variables it becomes tedious to create the getters and the setters. The Java api can easily make it part of the jdk so that the getters and the setters are generated automatically. There can be a marker interface which any JavaBean class can implement and that will tell the compiler to generate the getter and setter code during compilation process. Of course, if you have any specialized getter or setter, that will override the system generated ones.


Optimizing Garbage Collection


My second idea is on garbage collection. Right now the JVM runs the garbage collection thread and automatically cleans up memory for objects whose reference count is zero. But some of these checks can be achieved during compile time. If some object is created within a method and it is assigned to local variable only during compilation, the compiler can automatically generate garbage collection code when the method exits. This will not happen if the object is returned or attached to some non-local variable. This will make the job of the garbage collector thread much easier and will result in a faster program.






Print this article    Tell a friend
Post New Comment

This site does not allow anonymous comments. Registered members can login to participate. Registration is free and takes only a few seconds