Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2010
    Posts
    3
    Rep Power
    0

    Default Accss and define Class within Interfaces

    Hi Guys,

    Is it possible to define a class within the interface ?

    If it is possible how can i access class variables and and its methods ?

    -Selvaraj

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default

    Have you tried?

    Surely this is something you can knock up a simple example really quickly.

  3. #3
    lovelesh is offline Senior Member
    Join Date
    Nov 2010
    Location
    Delhi
    Posts
    135
    Blog Entries
    1
    Rep Power
    0

    Default

    Quote Originally Posted by rajselva@cooltoad.com View Post
    Hi Guys,

    Is it possible to define a class within the interface ?
    Yes its possible

    If it is possible how can i access class variables and and its methods ?
    One way is to keep Class static. Then instantiate the class and use its variables and methods as normal.

    -Selvaraj

Similar Threads

  1. how do you actually define a method?
    By edelric666 in forum New To Java
    Replies: 3
    Last Post: 10-30-2010, 10:26 PM
  2. Define class and constructors
    By HaDesT in forum New To Java
    Replies: 2
    Last Post: 03-04-2010, 05:02 PM
  3. Define this error.
    By jaicea in forum New To Java
    Replies: 3
    Last Post: 12-02-2009, 01:07 AM
  4. Replies: 3
    Last Post: 11-17-2008, 03:49 PM
  5. Class Reflection: Finding implemented interfaces
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-23-2008, 08:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •