(JBeginner) cant access "args" from other classes?!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sean Anderson

    (JBeginner) cant access "args" from other classes?!

    It seems I lack an understanding of varible (sorry, field) scope and need
    human feedback. I have read 5 books on java and everything in the help of
    my development tool says this should work fine, here are the details:

    TextEdit package

    Public TextEdit class
    Public TextEdit() method invokes Frame1
    Public Static main(String[] args)

    Public Frame1 extends DecoratedFrame class
    method in Frame1 tries to print "args"

    Compile Error: varible args not found in class TextEdit.Frame1 .

    I've tried using TextEdit.args and TextEdit.main() .args and several others
    until I became fed up with with my own ignorance.

    Everything elese in my app works fine but this.

    Please help

    Sean




  • Ryan Stewart

    #2
    Re: (JBeginner) cant access "args&quot ; from other classes?!

    "Sean Anderson" <seanka@datavir tue.com> wrote in message
    news:Y0RTb.8873 $GO6.5516@newsr ead3.news.atl.e arthlink.net...[color=blue]
    > It seems I lack an understanding of varible (sorry, field) scope and need
    > human feedback. I have read 5 books on java and everything in the help of
    > my development tool says this should work fine, here are the details:
    >
    > TextEdit package
    >
    > Public TextEdit class
    > Public TextEdit() method invokes Frame1
    > Public Static main(String[] args)
    >
    > Public Frame1 extends DecoratedFrame class
    > method in Frame1 tries to print "args"
    >
    > Compile Error: varible args not found in class TextEdit.Frame1 .
    >
    > I've tried using TextEdit.args and TextEdit.main() .args and several others
    > until I became fed up with with my own ignorance.
    >
    > Everything elese in my app works fine but this.
    >
    > Please help
    >
    > Sean[/color]

    I find it hard to believe that you have read five books about the language
    and still think that "TextEdit.main( ).args" should work and don't know that
    the keyword "public" is not "Public". I also think you should reread that
    help in your "developmen t tool", and if it really says that, ditch it.
    There's no way to do that. Period. End of story. Learn the language *before*
    you start mangling it:


    Then you can understand what you're mangling at least.


    Comment

    Working...