JAva Programs

Saturday, 28 July 2012

Hashcode Example


class hash {
public static void main(String args[]) {
        String s1="world";
        String s2="Hello";
System.out.println("The hash code for " + s1 + " is " + s1.hashCode());
System.out.println("The hash code for " + s2 + " is " + s2.hashCode());
}
}
Posted by Unknown at 19:12
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ▼  2012 (27)
    • ▼  July (27)
      • DirList example in java program using file handling
      • Directory of .HTML Files
      • FilenameFilter example in java
      • stack example java program using interface
      • interface example java program
      • multilevel with constructor example java program
      • multilevel inheritance example java program
      • single interitance example java program
      • Single inheritance example program
      • StringBuffer example
      • StringMeth examples
      • String class example
      • Equal function example program
      • Hashcode Example
      • String Example
      • Addtion program using matrix
      • Arrays
      • Constructor Example 1
      • Constructor Example
      • Wrapper Classes example
      • This Keyword Example 1
      • This Keyword example
      • Static Variables and Methods
      • Passing arguments and returning values.
      • Passing object as arguments.
      • Function overloading
      • Static Variables and Methods

About Me

Unknown
View my complete profile
Awesome Inc. theme. Powered by Blogger.