Title: Comparison Considerations in Java Programming
[Q1] When comparing String objects, you should not use relational operators. Instead, you should use an appropriate String method. So, what is the best way to compare if two strings are the same? Explain why and give a short Java code snippet example (don't need an entire program).
[Q2] Why must we be careful when comparing two double variables for equality? Explain and give a short Java code snippet example.
Other student: Why must we be careful when comparing two double variables for equality? Explain and give a short Java code snippet example.
1. Post a meaningful comment on a thread or post.