This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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
 
Similar Threads
confused question
Concurrency with Threads
inner class program - giving error
Inner Class
Interface Code:problem:need to resolve it