Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search Coderanch
Advance search
Google search
Register / Login
NarendraMohan Prasad
Greenhorn
+ Follow
4
Posts
3
Threads
0
Cows
since Oct 31, 2004
Merit badge:
grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
Ranch Hand Scavenger Hunt
Number Posts (4/100)
Number Threads Started (3/100)
Number Cows Received (0/5)
Number Likes Received (0/10)
Number Likes Granted (0/20)
Set bumper stickers in profile (0/3)
Report a post to the moderators (0/1)
Edit a wiki page (0/1)
Create a post with an image (0/2)
Greenhorn Scavenger Hunt
First Post
Number Posts (4/10)
Number Threads Started (3/10)
Number Likes Received (0/3)
Number Likes Granted (0/3)
Set bumper stickers in profile (0/1)
Set signature in profile
Search for a post/thread (0/3)
Set a watch on a thread
Save thread as a bookmark
Create a post with an image (0/1)
Recent posts by NarendraMohan Prasad
doubt about equals vs ==
I've written the following code for the test
I want reason for the difference between ==
and .equals.
a
why == is giving true for the "Test1"
public class StringObjTest { public static void main(String[] args) { String str1 = "Test1"; String str2 = "Test1"; String str3 = new String("Test1"); String str4 = new String("Test1"); System.out.println("This is Test"); System.out.println(" str1 == str2 :: "+(str1==str2)); System.out.println(" str1.equals(str2) :: "+str1.equals(str2)); System.out.println(" str1 == str3 :: "+(str1==str3)); System.out.println(" str1.equals(str3) :: "+(str1==str3)); System.out.println(" str3 == str4 :: "+(str3==str4)); System.out.println(" str3.equals(str4) :: "+str3.equals(str4)); } }
(Changed title to be meaningful)
[ June 06, 2007: Message edited by: Barry Gaunt ]
show more
16 years ago
Programmer Certification (OCPJP)
Java Abstraction
hi this not a way bcause we can use the wrapper object into our programs
show more
19 years ago
Other JSE/JEE APIs
Java Abstraction
Someone asked me to do abstraction without using abstract keyword. and told possible ways but he didn'e agree. so that pls tell me how we do this.
show more
19 years ago
Other JSE/JEE APIs
Servlet Authentication
Sir,
I would like to know the types of authentication in java servlets and what are these?
for this thanking
Narendra Mohan
show more
19 years ago
Servlets