'+' operator in java can be used to add numbers and concatenate strings. Following rules should be considered. Only numbers as operands then result will be a number. Only strings as operands then result will be a concatenated string.
so logically the answer is A (string) and C (numeric)
because it says valid data type, array is not a data type right?
In Java, the addition operator + is used for adding numerical values or concatenating strings.
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
nmkkrtcg
1 month, 2 weeks agotabrezshaikh13
5 months, 2 weeks agoCuriosityYen
7 months, 2 weeks ago