473,498 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

(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


Jul 17 '05 #1
1 2020
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2326
by: Anthony Baxter | last post by:
To go along with the 2.4a3 release, here's an updated version of the decorator PEP. It describes the state of decorators as they are in 2.4a3. PEP: 318 Title: Decorators for Functions and...
0
2679
by: Bill Davy | last post by:
I am working with MSVC6 on Windows XP. I have created an MSVC project called SHIP I have a file SHIP.i with "%module SHIP" as the first line (file is below). I run SHIP.i through SWIG 1.3.24...
7
1361
by: newseater | last post by:
Hello. I need to be able to control how objects are created. Sometimes when creating an object, i want to reuse another object instead. I've searched for factory method implementations and...
40
2983
by: Steve Juranich | last post by:
I know that this topic has the potential for blowing up in my face, but I can't help asking. I've been using Python since 1.5.1, so I'm not what you'd call a "n00b". I dutifully evangelize on the...
2
4693
by: Wimpie van Lingen | last post by:
Hey I have some more questions with regards to Remoting in .NET 2. I'm using TCP with the Binary formatter. My solution consists of 4 projects: - Class Library containing the server classes...
11
1456
by: Lost Prophet | last post by:
I posted this NullPointerException error a week ago. Ive made progress as now parts of it are being populated. 'report' all throughout the other non-listed classes is being populated. 'gui' all...
5
1426
by: Guillermo | last post by:
Hi, This must be very basic, but how'd you pass the same *args several levels deep? def func2(*args) print args # ((1, 2, 3),) # i want this to output (1, 2, 3) as func1!
8
2683
by: ssecorp | last post by:
I first learned about OO from Java. I much prefer to program in Python though. However I am consufed about 2 things. 1. Why do I have to pass self into every method in a class? Since I am...
3
3336
by: Matt | last post by:
Hi everyone, can someone point out the difference between defining a class with the public access modifier and just leaving it as it is (default in vs.net "class") I think that the default...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7203
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4908
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3081
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1417
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
290
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.