Predict the output of the below code : String emailId="john#global.com"; System.out.println(emailId.indexOf('@'));
Answer options
A
indexOf('@'));
B
Any negative integer
C
-1
D
0
E
1
Correct answer: -1
Detailed Solution & Conceptual Analysis
This question has been retained as-is due to its unique context.
Key Engineering Takeaway
In Java Programming, understanding the underlying mechanics of Java Programming is critical for writing performant, bug-free production code and passing rigorous technical architecture reviews.