SCJP 6. Learning more now.
dileep keely wrote:package com.tcs.test;
public .....
...output: true
This is what you looking for ?
SCJP 6. Learning more now.
SCJP 6. Learning more now.
Rahul Sudip Bose wrote:
PS : I AM HAVING TROUBLE IN INDENTING CODE HERE, SOME OF IT APPEARS AT THE RIGHT PLACE IN EDITOR, BUT INCORRECTLY AFTER POSTING. PLEASE ADVISE.
Campbell Ritchie wrote: . . . and there is no need to write in UPPER-CASE, thank you very much.
SCJP 6. Learning more now.
Rahul Sudip Bose wrote:I am trying to make the below program work PROPERLY (it compiles) : I read in the K&B book that password entered via readPassword() of console must not be saved as a string because it may remain in the string pool and be misused...blah...blah...hence i am avoiding the use of string in the below question.
Campbell Ritchie wrote:You can try overriding the equals method; StringBuilder has an unoverridden equals() method because its contents are intended to change rapidly.
Apology acceptedRahul Sudip Bose wrote: . . . not shouting as the tut taught ... no offence was intended. Will do it properly in the future.
I looked on the API documentation pages and didn't see final. I have obviously looked in the wrong place, because it says final elsewhere.Mike Simmons wrote: . . . Can't - StringBuilder and StringBuffer are both final.
SCJP 6. Learning more now.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |