Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

dollar sign in .class names (and lots of em)?

Posted on 2001-08-06
2
Medium Priority
?
243 Views
Last Modified: 2010-03-31
Hi everyone,

I just had a simple question for a java person.  I recently made a graphical java application named prog.java.  after i compile it, wham! 15 classes appear, named prog.class, prog$1.class, ..., prog$14.class.  

What's that all about?  If anyone has seen a good source on the net explaining this, i would love to see a link.  

Thanks so much,
Jennifer.

Please comment your comments. thanks!
0
Comment
Question by:jenniferx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
dviji earned 140 total points
ID: 6357044
All the $x.class are inner classes.
i.e

if you have the class like

public class A
{
 //..
 class b
 {
  //..
 }
}
If you compile the class you will get A.class & A$b.class. It means class b is an inner class for class A.

In your GUI program you may be used Listener inner classes.

For more detail goto http://java.sun.com/products/jdk/1.1/docs/guide/innerclasses/.

...dviji
0
 

Author Comment

by:jenniferx
ID: 6357640
Thank you dviji,

that helped a lot. you were right, i have many listeners.

Jennifer.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question