May 25

Why StringBuffer and StringBuilder has not overridden equals() and hashCode()

Comparing Two Strings: If we want to compare two strings,we can simply use equals() as below String str1=new String("nataraz");     String str2=new String("nataraz");      System.out.println(str1.equals(str2));//prints true     System.out.println(str1==str2);//prints false     System.out.println(str1.hashCode()+":"+str2.hashCode());//returns same value hashCode() is overrided in String class,and … Continue reading

May 13

Scott SQL script

Since Mr scott left Oracle corporation,Scott user is removed from Oracle database 10 onwards.But If you want to  have them,you can create them manually.Here is the process and script to create them manually. 1.Login to Oracle using any user having … Continue reading