"SCJP5 | SCWCD5| DEVELOPER"
"SCJP5 | SCWCD5| DEVELOPER"
<code>
public class VariableSamples
{
 int intanceVar;
  //An instance variable....each instance will have its own copy
 static int classVar;
  // A Static variable...the same value available to all instances
 public void SampleMethod(){
   short localVar1 =0;
   // A local variable...needs explicit initialisation
 }
 {
  byte anotherLocalVariable =0; //A local variable inside a block
 }
}
</code>
String and StringBuffer classes can't be compared with equlas() method, but String and String values can be checked for equality and also StringBuffer and StringBuffer values can be checked for equality.
"SCJP5 | SCWCD5| DEVELOPER"
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
"SCJP5 | SCWCD5| DEVELOPER"
"SCJP5 | SCWCD5| DEVELOPER"