• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I want to use java properties from an interface

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could anyone help with my code below, for it to work. Or is it not possible from an interface point of view. How can I go about it? Any help would be gladly appreciated. Thanks in advance.

[This message has been edited by Peter Tran (edited November 16, 2001).]
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Bob,
not quite sure what you're trying to do here, but definitely the interface thing is a problem. interfaces are for defining constants and method signatures (method names, parameters, parameter types and method return types). you cannot put any significant code in them.
probably best off sticking to a class for now (replace interface with class), put all your code in a TransformIf() constructor, move filePath etc. to top of your class.
i would give you more help, but the embedded subliminal.message is making me worried that there is a moral dimension to all this.
hope that helps.
cheers, dan.
 
bob morkos
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What I want is to have a class that loads my properties and in which I can call my variables anywhere in my application like an interface. By just implementing the interface, I get all the variables intialized in the interface. What I was doing is the same but instead of an interface, I wanted to use properties. Thanks again for replying and I hope you understand what I 'm trying to do.

Originally posted by dan moore:
hi Bob,
not quite sure what you're trying to do here, but definitely the interface thing is a problem. interfaces are for defining constants and method signatures (method names, parameters, parameter types and method return types). you cannot put any significant code in them.
probably best off sticking to a class for now (replace interface with class), put all your code in a TransformIf() constructor, move filePath etc. to top of your class.
i would give you more help, but the embedded [b]subliminal.message
is making me worried that there is a moral dimension to all this.
hope that helps.
cheers, dan.[/B]


 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic