By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 916 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

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

P: n/a
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


Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Sean Anderson" <se****@datavirtue.com> wrote in message
news:Y0*****************@newsread3.news.atl.earthl ink.net...
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


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 "development 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:
http://java.sun.com/docs/books/tutorial/

Then you can understand what you're mangling at least.
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.