This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes class declaration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "class declaration" Watch "class declaration" New topic
Author

class declaration

antraarora
Ranch Hand

Joined: Jul 27, 2000
Posts: 45
Can somebody help me with this one.
Which variables should you use to declare the class Hexagon. Hexagon is drawable and it has several vertices, Colors that can be stored by a Vector and a flag of boolean type. What can you use to declare the member variables of this class?
A. Object
B. boolean
C. Vertice
D. Vector
E. Hexagon
Since none of the modifiers are given...do we assume that we have to specify the modifier(public) as a part of declaration?
Should it be
public class Hexagon extends drawable(vertice integer, flag boolean, color vector){}
Now, 1. I have used a lot of words not given. Is that right?
2. What is the correct answer?
3. Should {} be used while decalaring a class?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: class declaration