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.
This question has been retained as-is due to its unique context.