File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes public inner class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "public inner class" Watch "public inner class" New topic
Author

public inner class

Kush Kush
Greenhorn

Joined: Apr 27, 2004
Posts: 11
class Outer
{
public class Inner
{
//inner class code
}
public static void main(String lal[])
{
System.out.println("");
H h=new H();
Inner i=h.new Inner();
}

In above code what is the use of Public (non - static )Inner Class ?


Smile with JAVA
Peter Shipway
Ranch Hand

Joined: Mar 25, 2004
Posts: 71
I think that the code in the main method somehow relates to it, hence it being public im not sure on this the standard that i folllow is to use the static main class tpo to run another method eg
public static void main (Sting [] args) {
ProgramName tpo = new ProgramName();
tpo.nameofMethod();
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: public inner class