aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes scjp question required Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "scjp question required" Watch "scjp question required" New topic
Author

scjp question required

VINCE CARTER
Greenhorn

Joined: Sep 26, 2004
Posts: 13
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

Joined: Aug 10, 2004
Posts: 175
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 ]

MCP (C# application dev 70-316) 860<br />SCJP 1.4 100% SCJD (URLyBird) 378<br />MAD 100% nuts
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Technically, none of them, because of the uppercase letters. ("Final" is not "final.")

That aside, Inuka is correct.



"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Inuka Vincit
Ranch Hand

Joined: Aug 10, 2004
Posts: 175
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

Joined: Aug 28, 2004
Posts: 70
Thanks !!!
 
Don't get me started about those stupid light bulbs.
 
subject: scjp question required