aspose file tools*
The moose likes Beginning Java and the fly likes Inner class access specifier Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Inner class access specifier" Watch "Inner class access specifier" New topic
Author

Inner class access specifier

Siva kandasamy
Ranch Hand

Joined: Dec 31, 2002
Posts: 139
Hi There,
I have appended two example below.
example(1) has no issues, works great. Placed here
only as a reference.
May I know, why ? I am unable to compile the code
placed in the example (2).
Error message is also appended inthe bottom of the code. Example (2) has two program ie. InnTestA.java and InnerD.java

Let me know, if you have any questions.
Thanks in advance.
-siva

********* example(2) begins ***********

====file: InnTestA.java ==========

=========File: InnerD.java =============


Compiler error:
==============
~/reading/java % javac InnerD.java
InnerD.java:7: No constructor matching InnTestA. Ica() found in nested class com.siva.simple.InnTestA. Ica.
Ica a = new Ica();
^
1 error
~/reading/java %
********* example(2) ends ***********
[ January 07, 2003: Message edited by: Sivanantham kandan ]
[ January 07, 2003: Message edited by: Sivanantham kandan ]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
What exactly is the issue you are having? What *exactly* happens when you try to "create" (instanciate?) the inner class?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Siva kandasamy
Ranch Hand

Joined: Dec 31, 2002
Posts: 139
Hi There,
I did edit and re-posted my question.
Hope it make more sense now.
Thanks
siva
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Try recompiling InnTestA.java. I'm guessing you've got an old InnTestA@Ica.class file from an older version of InnTestA.java which had different constructors. To be safe, delete all your .class files and recompile them with javac.
[ January 07, 2003: Message edited by: Jim Yingst ]

"I'm not back." - Bill Harding, Twister
Siva kandasamy
Ranch Hand

Joined: Dec 31, 2002
Posts: 139
Still the same problem.
-siva
Raj Neets
Ranch Hand

Joined: Nov 12, 2002
Posts: 46
Hello shiva
Try this one, change ur object creation statement like this
InnTestA.ica a = new InnTestA.ica();
Hope this will work.
[ January 08, 2003: Message edited by: Raj Neets ]
Siva kandasamy
Ranch Hand

Joined: Dec 31, 2002
Posts: 139
Hi,
Thanks to all.
It works FINE after building a public constructor in the class InnTestA.java as stated below.


-siva
[ January 09, 2003: Message edited by: Sivanantham kandan ]
[ January 09, 2003: Message edited by: Sivanantham kandan ]
[ January 09, 2003: Message edited by: Sivanantham kandan ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inner class access specifier