manoj


{ City } berhampur
< Country > india
* Profession * gis technician
User No # 53925
Total Questions Posted # 2
Total Answers Posted # 3

Total Answers Posted for My Questions # 10
Total Views for My Questions # 12504

Users Marked my Answers as Correct # 29
Users Marked my Answers as Wrong # 2
Questions / { manoj }
Questions Answers Category Views Company eMail

JVM is platform independent or depeneded?

7 Core Java 7969

what is type of statement in jdbc connection?

3 Core Java 4535




Answers / { manoj }

Question { Cisco, 13883 }

whats the difference between == and .equal ?


Answer

In java if u use the .equal method it will compare the two
value if the values are match with each other the result
will give true otherwise false.
But if u use == it will compare the reference(address
of)two values.
s1 = new String("abc");
s2 = new String("abc");
Now, if you use the "equals()" method to check for their
equivalence as
if(s1.equals(s2))
System.out.println("s1.equals(s2) is TRUE");
else
System.out.println("s1.equals(s2) is FALSE");
it will give the output TRUE
let's try using '=='
if(s1==s2)
System.out.printlln("s1==s2 is TRUE");
else
System.out.println("s1==s2 is FALSE");
Now you will get the FALSE as output because both s1 and s2
are pointing to two different objects even though both of
them share the same string content. It is because of 'new
String()' everytime a new object is created.

if u try with out using new keyword the output will TRUE.



Is This Answer Correct ?    20 Yes 1 No

Question { 10083 }

what is meant by package in java?


Answer

Package is nothing but it can be call as container of all
related class.All *.class files are stored in a package for
that we can implement the require *.class files in our
program.In java one package can be implement by using the
keyword import.The syntex is
import java..*;

Is This Answer Correct ?    5 Yes 1 No


Question { Photon, 6398 }

what is the main class of all the classes


Answer

OBJECT CLASS IS THE MAIN CLASS OF ALL CLASS

Is This Answer Correct ?    4 Yes 0 No