Asked in Addiction at 4:18 PM on September 11, 2009
Tags: abc, test
testing ok
Answered by Abdullah , an ibibo Citizen, at 4:24 PM on September 11, 2009
.Try running the program without new String and just with String s1 = "abc"; String s2 = "abc";You will get TRUE for both the tests.Explanation : 2By definintion, the objects are all created.Try running the program without new String and just with String s1 = "abc"; String s2 = "abc";You will get TRUE for both the tests.For more details , Please visit the source site :http
== operator on strings, compares strings by content. But == operator on objects just checks if the objects are same. So the first statement is true because both strings contain "test with. char[...] test = t,e,s,t;string x = "test";string y = new string test;object ox=x;object oy=y;Console.WriteLinex== y;Console .WriteLineox==oy;Console .WriteLinex.Equalsy;Cons ole
how to make any folder/file hidden using the this attribute.Ill use an example to make it easier, go to My Documents and created a new folder called Test, put some useless files and folders into it files.To change this, select Tools > Folder Options > View then check the Do not show hidden files and folders. box. Now the Test folder should disappear.Whenever you want to make the folder re
.So you should have to write a main method with in your java program .For Example :Class ABCpublic ABC //Constructor-------p ublic static void mainnew ABC;Here a Class name as ABC is created and when you run this program the main method is called by java interpretor which call Class constructor by a new ABC.Hope this information will help you....jwenting I wouldnt expect that class to have a main method
Help us avoid spam Enter characters as shown above
Want an Answer Alert? Enter your email
Categories
View All