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

Dec 10

You cannot Create Con.java

beep

In Operating system,we have 2 kind of ports Hard Ports(USB Ports,Printer Ports,LAN Ports) Soft Ports Soft Ports are of different type like Serial Communication Ports  (COM1,COM2,…COM9) Auxiliary Ports (AUX) Line Print Terminal Ports (LPT1,LPT2,….LPT9) These ports names(COM1 to COM9 , … Continue reading

Dec 03

Find the Nth Highest record in Oracle.

Lets consider the table Student SQL> create table student ( SNO  NUMBER, SNAME  VARCHAR2(20), MARKS NUMBER ); Lets insert some records into that DB SQL>insert into student values(23,’kumar’,437); SQL>insert into student values(35,’kumar’,200); SQL>insert into student values(41,’sankar’,200); SQL>insert into student values(49,’raja’,209); … Continue reading