employer cover photo
employer logo
employer logo

Tata Consultancy Services

Part of Tata Group

Engaged employer

Tata Consultancy Services interview question

String s = "Hey"; s = s.concat(" Guys") sop(s)

Interview Answers

Anonymous

7 Oct 2021

It should be Hey as Strings are immutable

1

Anonymous

23 Nov 2021

HeyGuys

Anonymous

31 May 2019

I know its 'Hey guys' but they were in an assumption that it is 'Hey' dont know how.

Anonymous

10 July 2019

I think the interviewer were in assumption that Strings in java are immutable. that's why they said it's only hey. but hey guys is the right answer

2