Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Java Java-introduction Introduction

Related Tutorials


 
 

Share on Google+Share on Google+

Introduction

Advertisement
What is case sensitivity: Case sensitivity is the mechanism in which words can be differ in meaning based on different use of uppercase and lowercase letters.

Introduction

     

  • What is case sensitivity 
  • Case sensitivity in Computers 
  • Case Sensitive and case insensitive Languages
  • Examples  

What is case sensitivity:  Case sensitivity is the mechanism in which words can be differ in meaning based on different use of uppercase and lowercase letters. Sometime words can differ in meaning with the same words while starts with capital letter  with lowercase letters.

Case sensitivity in Computers:  Case sensitivity is the mechanism by which computer compares two words to decide whether they are equal, it may or may not consider words equal which only differ in case.

Case Sensitive and case insensitive Languages:   On the basis of case sensitivity, computer languages can be divided into two parts. Computer languages  like C, C++  and java are case sensitive languages while others are case insensitive like BASIC and Pascal. 

Examples:

   The Java class Helloworld is a completely different class from the class HelloWorld.

   public static void main(String args[]) is totally different from public static void main(string args[]).

   If you compare two strings in a case sensitive way then they are considered different if they differ only in capitalization e.g. comparing the string by using the method String.compareTo,   If you compare two Strings in a case insensitive way then they are considered equal if they differ only in capitalization. e.g. comparing the string with String.compareToIgnoreCase,

 

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: February 25, 2008

Related Tutorials

Discuss: Introduction   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com