Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8254223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:07:06+00:00 2026-06-08T01:07:06+00:00

Possible Duplicate: Compiler is creating extra class files with $ in them I am

  • 0

Possible Duplicate:
Compiler is creating extra class files with $ in them

I am using Netbeans to design a java app in which I am using Java Swing so apart from Java source files, I will have .form files which contains the description about the Java form.

In src diectory, I have 3 files like,

Downloader.java
DownloadCore.java
Downloader.form

Now, If I compile them manually using command prompt, (.i.e. without using Netbeans) then I am getting lot of .class files like,

DownloadCore.class
Downloader$1.class
Downloader$10.class
Downloader$11.class
Downloader$12$1.class
Downloader$12.class
Downloader$2.class
Downloader$3.class
Downloader$4.class
Downloader$5.class
Downloader$6.class
Downloader$7.class
Downloader$8.class
Downloader$9.class
Downloader.class

I am wondering why JVM creating this much of .class files, in which I have only 2 .java files, so it doesn’t supposed to create 2 .class files alone. Why is it required?

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:07:08+00:00Added an answer on June 8, 2026 at 1:07 am

    Every class has its own .class files — even anonymous ones. For instance:

    // "top level" class -- in MyWhatever.java
    public class MyWhatever {
    
        // anonymous class
        public static final Runnable anonymousRunnable = new Runnable() {
            @Override
            public void run() {
                System.out.println("I am an anonymous Runnable.");
            }
        }
    
    }
    

    This code snippet defines two classes — MyWhatever and the anonymous class for anonymousRunnable. That second one will be called MyWhatever$1, which is what you’re seeing. Each one of them will have its own .class file.

    (By the way, it’s not the JVM creating these class files — it’s the Java compiler, like javac or whatever Netbeans uses. The JVM then loads these class files and executes them.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How to set a java compiler in Netbeans I m getting the
Possible Duplicate: C compiler bug (floating point arithmetic)? I've got two doubles which I
Possible Duplicate: Java - why no return type based method overloading? The compiler does
Possible Duplicate: How can I configure Vim to compile C code using Borland’s compiler
Possible Duplicate: jQuery compiled with Google Closure Compiler I am using jQuery and I
Possible Duplicate: Understanding which constructor is chosen and why Why compiler acts like this,
Possible Duplicate: Custom Compiler Warnings Duplicate: Custom Compiler Warnings I'm new to writing my
Possible Duplicate: Does the compiler continue evaluating an expression where all must be true
Possible Duplicate: Plugging in to Java compilers Edit - this appears to be a
Possible Duplicate: How do I make a request using HTTP basic authentication with PHP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.