For example, it is not generally permssible for one thread to modify a Collection while another thread is iterating over it.
for(Personel personel : personelList){
if(!personel.getSelected()){
personelList.remove(personel);
}else{
personel.setParent(parent);
}
}
sun
“Low quality code is not cheaper; it is vastly more expensive, even in the short term. Bad code slows everyone down from the minute that it is written. It creates a continuous and copious drag on further progress. It requires armies of coders to overcome that drag; and those armies must grow exponentially to maintain constant velocity against that drag.” Robert C. Martin
Friday, March 13, 2009
Abstract Class-Concrete Class example :)
Abstract classes are "abstraction" of a class as the name suggests. As an example: The Human class can be an abstract class and in its concrete classes "man" and "woman", some of the functionalities are common. For example "human" can have a function "walks". Now "walks" is something that belongs to all humans. But "dances" is a function that might be different for "man" and "woman" or maybe to anyone who belongs to this class. So we over ride the "dances" functionality to provide seperate implementation to different implementors.
Wednesday, March 11, 2009
Linux copy directory
You can use;
cp -Rf source_dir/ dest_dir/
to copy one directory to another. And -R parameter means Recuresively; f means forcefully.
cp -Rf source_dir/ dest_dir/
to copy one directory to another. And -R parameter means Recuresively; f means forcefully.
Wednesday, March 4, 2009
eclipse.ini
Here is my eclipse.ini file :
-vm C:\Program Files\Java\jdk1.6.0_12\jre\bin
-vmargs
-Dsun.lang.ClassLoader.allowArraySyntax=true
-Xms40m
-Xmx512m
My development environment is Eclipse 3.4.1, Weblogic 10.3 ...
We were using OC4J but now we changed the Application Server to WebLogic and the JDK version 1.5 to 1.6. Some of my friends said that, If I use bea_rockit version of the JDK the memory leak occures. So I changed the virtual machine configuration to standart Sun JDK.
-Xms40m
-Xmx512m
-->
Sets the heap space 40MB initially and a maximum of 512MB. These values can differ depending on your development environment.
-vm C:\Program Files\Java\jdk1.6.0_12\jre\bin
-vmargs
-Dsun.lang.ClassLoader.allowArraySyntax=true
-Xms40m
-Xmx512m
My development environment is Eclipse 3.4.1, Weblogic 10.3 ...
We were using OC4J but now we changed the Application Server to WebLogic and the JDK version 1.5 to 1.6. Some of my friends said that, If I use bea_rockit version of the JDK the memory leak occures. So I changed the virtual machine configuration to standart Sun JDK.
-Xms40m
-Xmx512m
-->
Sets the heap space 40MB initially and a maximum of 512MB. These values can differ depending on your development environment.
Subscribe to:
Posts (Atom)