This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes interface within a class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "interface within a class" Watch "interface within a class" New topic
Author

interface within a class

Sricharan Modali
Greenhorn

Joined: Mar 30, 2004
Posts: 19
Hi
I havent seen any explanation on Interfaces with classes in K&B and there are
quite a few quesions in the mock exams on this issue. I just wanted all of u to look in to this topic.
--Sricharan
Giuoco Krag
Greenhorn

Joined: Mar 23, 2004
Posts: 10
Many of the topics I've seen on interfaces are based on casting and converting objects (implements vs. extends in a casting situation).
Is this the direction you would like to explore?
I'd like to futher my knowledge in the rules for casting objects as well as runtime converting objects too.
Sricharan Modali
Greenhorn

Joined: Mar 30, 2004
Posts: 19
Hi
What i meant was questions like these
Which of the following statements is not true?
a. An interface that is declared within the body of a class or interface
is known as a nested interface.
b. A constant can be a member of an interface.
c. A class declaration can be a member of an interface.
d. A class that implements an interface must implement all of the methods
declared within the interface.
e. None of the above.
The answer is d
For this kind of a question we need to be aware that this is possible..
interface I
{
public class Inner
{

}
interface InnerInterface
{

public void hi();
}
}
and even this ....
public class ClassName
{
public static void main(String[] args)
{
ClassName cn = new ClassName

}
interface Inclass
{

}

}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: interface within a class
 
Similar Threads
The x900 effect ?
WA #1.....word association
Cant use object from another class
Posting to bump up my count...
Text box value is not being completely filled with request attribute