- Wednesday, February 10, 2010, 15:12
- Java
- 14,774 views
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 ...
Full story
- Monday, October 5, 2009, 21:58
- J2EE, Java
- 6,913 views
Recently while running Tomcat under Eclipse for one of the web application I was getting Java Heap memory related error java.lang.OutOfMemoryError.
What needs to be done here basically is to increase the
jvm heap size. So for increasing the JVM Heap Size of Tomcat in Eclipse we have to set few VM arguments of the tomcat.
Follow ...
Full story
- Monday, August 31, 2009, 18:10
- Featured, Java
- 7,472 views
Garbage collection is a way in which Java recollects the space occupied by loitering objects. By doing so, it ensures that your application never runs out of memory (though we cannot be assured that the program will ever run out of memory).
Full story
- Tuesday, May 19, 2009, 13:42
- How-To, Java
- 10,484 views
Reading runtime information about Java is useful sometime when your application is struggling in getting resources. System Memory is one of the main resource that an application developer has to consider while managing the application.
Hence sometimes it is beneficial to see what amount of memory is your application using and what is the free memory ...
Full story
- Monday, January 12, 2009, 12:58
- How-To, Java
- 55,754 views
Java programs executes in JVM uses Heap of memory to manage the data. If your Java program requires a large amount of memory, it is possible that the virtual machine will begin to throw OutOfMemoryError instances when attempting to instantiate an object. The default heap size if 1 MB and can increase as much as 16 ...
Full story
- Friday, December 26, 2008, 20:22
- Featured, Java
- 11,133 views
Java Virtual Machine, or JVM as its name suggest is a "virtual" computer that resides in the "real" computer as a software process. JVM gives Java the flexibility of platform independence. Let us see first how exactly Java program is created, compiled and executed.
Java code is written in .java file. This code contains one or more Java language attributes like Classes, Methods, Variable, Objects etc. ...
Full story