Java String comparison. The difference between == and equals().

24 Comments

javaString1 300x297 Java String comparison. The difference between == and equals().Many Java beginners find it difficult to differentiate between == operator and the “equals()” method when comparing String variables in Java. They assume that both operations perform the same function and either one can be used to compare two string variables. I have even seen many experienced programmers committing the mistake of using “==” to compare the values of two strings.

So what is the difference between “==” and “equals()” and what is the correct method of comparing two string variables?
More

article clipper vert Java String comparison. The difference between == and equals().
 

An HTML element you don't want to omit.

1 Comment

doctypes An HTML element you don't want to omit.

Doctypes

As web developers we have the tendency to blame web browsers for inconsistencies and for not displaying the pages as designed. Most of the time the blame is justified, but there are instances when the blame lies at the feet of the web developers. For example, incorrect CSS declarations, missing closing tags in HTML documents will break you website. Another common and often overlooked reason of broken web pages is the missing or incorrect DOCYTYPE declaration. More

article clipper vert An HTML element you don't want to omit.
 

A fresh new look.

2 Comments

Welcome to redesigned and improved zParacha.com. I have been thinking of giving my blog a face-lift for some time. I considered several options including designing/developing a new theme from scratch, buying Thesis and then modifying it, or buying a premium theme. Since I have several options I kept considering pros and cons of each one and in the process the planned upgrade was delayed. Basically I was just procrastinating.

Finally, I decided to get it down and settled on this elegant, free premium theme. I am still working on some minor customization but I believe this is a nice, professional-looking theme that meets my requirements.

Share your thoughts on this new design. Do you like the color scheme, page layout? What do you not like? What elements do you think I can change to further improve the look?

article clipper vert A fresh new look.
 

Why you should stop using onload method.

8 Comments

onload1 276x300 Why you should stop using onload method.

Onload

It is amazing that many web developers still use onload method embedded in the BODY tag, like


 <HEAD>
 <BODY onload="document.contact.userID.focus();">
  <form name="contact">
   <input type="text" name="userID" >
  </form>
  </BODY>
 </HEAD>

There are two problems with this line of code.

  1. Embedding code (behavior) with HTML (structure) makes it difficult to maintain the page.
  2. onload() method will executes only after the page is fully displayed.
  3. Let’s see how to fix these problems. More

article clipper vert Why you should stop using onload method.