Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scjp question required

 
VINCE CARTER
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. public interface Foo{
2. int k = 4;
3. }
Which three are equivalent to line 2? (Choose Three)
A. Final int k = 4;
B. Public int k = 4;
C. Static int k = 4;
D. Private int k = 4;
E. Abstract int k = 4;
F. Volatile int k = 4;
G. Transient int k = 4;
H. Protected int k = 4;
Answer: A, B, C
I think the answer should be :B,D,H
Right ??
 
Inuka Vincit
Ranch Hand
Posts: 175
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no its a,b,c
variables in an inteface are public static final implicitly(that even when you dont declare is as such)
java spec interface fields(constants)
[ September 26, 2004: Message edited by: Inuka Vincit ]
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Technically, none of them, because of the uppercase letters. ("Final" is not "final.")

That aside, Inuka is correct.

 
Inuka Vincit
Ranch Hand
Posts: 175
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by marc weber:
Technically, none of them, because of the uppercase letters. ("Final" is not "final.")

That aside, Inuka is correct.



you got me there marc
 
PETER CARTER
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks !!!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic