What is the difference between the '==' operator and the '.equals()' method in Java?
Ans. The '==' operator checks reference equality, while '.equals()' checks value equality in Java.
'==' compares memory addresses (references) of objects.
Example: String a = new String("test"); String b = new String("test"); a == b returns false.
'.equals()' compares the actual content of objects.
Example: a.equals(b) returns true because the content is the same.
I applied through college or university. The process took 3 weeks. I interviewed at Tata Consultancy Services (Hyderâbâd) in Apr 2021
Interview
1st round: online test(mcqs+coding)
2nd round: technical interview
About yourself?
Asked about project?
Asked about skills like about sql?
What is DBMS?
What is entity?
What are joins?
Asked practical coding question?
3rd round: manager round
I applied through college or university. I interviewed at Tata Consultancy Services (Chennai) in Dec 2024
Interview
Self intro
Brief about projects n internship
Basics of electronics (covers all domain)
Programming
Sql
Oops with real world examples
Computer networks
Basic cpp interview questions
Hr questions like relocation, family background and hobbies.