A is correct, you cannot have a boolean, double or long in a switch statement thus B is incorrect. C would result in the default statement being printed out
Antwort B ergibt kein sinn , also es muss ein String sein , und bei C und D auslassen oder nicht kommt nur ; DONE raus
public static void main(String[] args) {
String opt = " true";
switch (opt) {
case "true":
System.out.print("True");
// break;
// default:
System.out.print("***");
}
System.out.println("Done");
}
}
also nur Done / oder ?
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.
M_Jawad
Highly Voted 4 years, 11 months agovic88
Most Recent 1 week, 6 days agoarjunrawatirissoftware
1 year, 2 months agoduydn
1 year, 3 months agoSreeni_A
1 year, 3 months agosylwia000001
1 year, 7 months agosylwia000001
1 year, 7 months agoVicky_65
1 year, 8 months agohexadecimal82
2 years, 5 months agoMthlagi
2 years, 10 months agoalexandrustefanescu
3 years, 5 months agoFuego_412_
3 years, 12 months agobobob
4 years, 3 months agoAnton2020
3 years, 2 months agoGyzmou
4 years, 4 months agoSamAru
4 years, 5 months agov323rs
4 years, 11 months agodya45792
5 years ago