aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes sample sun test 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 "sample sun test" Watch "sample sun test" New topic
Author

sample sun test

Basu Patel
Ranch Hand

Joined: May 28, 2000
Posts: 60
Can anyone answer the following qns. for me , thank you
2.What should you use to position a Button within an application Frame so that the size of the Button is NOT affected by the Frame size?
A.a FlowLayout
B.a GridLayout
C.the center area of a BorderLayout
D.the East or West area of a BorderLayout
E.the North or South area of a BorderLayout

3. Which is the advantage of encapsulation?
A.Only public methods are needed.
B.No exceptions need to be thrown from any method.
C.Making the class final causes no consequential changes to other code.
D.It changes the implementation without changing the interface and causes no consequential changes to other code.
E.It changes the interface without changing the implementation and causes no consequential changes to other code.

5. Which statement is true about a non-static inner class?
A.It must implement an interface.
B.It is accessible from any other class.
C.It can only be instantiated in the enclosing class.
D.It must be final if it is declared in a method scope.
E.It can access private instance variables in the enclosing object.

<BR>Contact Me<BR> <A HREF="mailto:basu_patel@usa.net" rel="nofollow">basu_patel@usa.net</A> <P>
Anuj Saxena
Greenhorn

Joined: Oct 15, 2000
Posts: 1
I think ....
Answer to Q1 -> a)
I think it is (a) because a FLowLayout Manager honors the component's preferred size.

Answer to Q2 -> d)
I think it is (d) because encapsulation allows you to perform maintenance on your code without causing any other code that uses these variables or methods to be rewritten.
Answer to Q3 -> e)
The other 4 are not really required for inner classes... as far as I know.
Could someone verify my answers please? Thanks
Anuj
Jeff Holmes
Ranch Hand

Joined: Oct 04, 2000
Posts: 44
I agree with the answers.
Sanjeev Verma
Ranch Hand

Joined: Aug 24, 2000
Posts: 87
Ditto!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sample sun test