🚀 Join 1,200+ candidates currently preparing with PrimerPrep
Java Programming
Accenture Technical PrimermediumJava Programming04 Arrays And Strings

String name="teknoturf"; String cname="teknoturf"; String compname=new String("teknoturf"); 1.if(name==cname) 2.if(name.equals(cname)) 3.if(name==compname) 4.if(name.equals(compname)) Identify the output.

Answer options

A
equals(cname)) 3.if(name==compname) 4.if(nam
B
equals(compname)) Identify the output.
C
Line 3,4 will return5 true2. 248
D
Line 1,3,4 will return tru
E
Line 1,2,4 will return tru
F
Line 1,3 will return tru

Correct answer: Line 1,2,4 will return tru

Explanation

Quick AnswerThe correct answer is Line 1,2,4 will return tru because it directly addresses the core logic of Java Programming.

Correct answer: Line 1,2,4 will return tru.

Related Accenture Java Programming questions

Practice more Accenture Java Programming questions

PrimerPrep has 1400+ practice questions, 2026 simulations and coding hands-on — all free.

Watch Walkthroughs!