posted 22 years ago
hi,
class Z {
void m1() {
abstract class A {} // 1
final class B {} // 2
private class C {} // 3
protected class D {} // 4
public class E {} // 5
static class F {} // 6
synchronized class G {} // 7
transient class H {} // 8
volatile class I {} // 9
strictfp class J {} // 10
}
}
Which of the follow class declarations results in a compiler error?
ans is 3,4,5,6,7,8,9,
synchronized,volatile,transient are field modifiers, so 7,8,9, correct, but why? 3,4,5,6.
anybody correct me?
thx