Skip to content

Commit 31809dd

Browse files
authored
Hashcode
1 parent ac812fc commit 31809dd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Java/HashCodeDemo.java

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
public class HashCodeDemo {
2+
public static void main(String args[]){
3+
String text ="Ganga";
4+
String text1 ="GangaRiver";
5+
Integer e = text.hashCode();
6+
System.out.println(text1.hashCode());
7+
String str = text1.substring(0,5);
8+
System.out.println(str);
9+
Integer f = text1.hashCode();
10+
System.out.println(e.equals(f));
11+
}
12+
}

0 commit comments

Comments
 (0)