Answer is A.
Source code:
public class Test {
char c;
boolean b;
float f;
void printAll() {
System.out.println("c = "+c);
System.out.println("b = "+b);
System.out.println("f = "+f);
}
public static void main(String[] args) {
Test t = new Test();
t.printAll();
}
}
The right answer is A, the reason is because the default value of a char is an empty one, the default value of a boolean is false and a default value of a float is 0.0
upvoted 4 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.
duydn
5 months, 1 week agosina_
6 months, 1 week agotuyetan
7 months, 3 weeks agoVicky_65
10 months agocarloswork
1 year, 3 months agoiSnover
1 year, 4 months ago