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

  • Home
  • SEARCH
  • 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 8729239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:47:50+00:00 2026-06-13T08:47:50+00:00

lets say i have a file MainClass.class which i think contains the following code

  • 0

lets say i have a file MainClass.class which i think contains the following code

public class MainClass {
public static void main(String[] args) {

    App app = new App(5,17);
    app.Answer();

}
}

based on the MainClass.class i wrote a simple class called App.java, witch add 2 numbers.

public class App {
private int num1;
private int num2;
private int sum;

public App(int n1, int n2){
    num1=n1;
    num2=n2;
}

public void Answer(){
    sum=num1+num2;
    System.out.println("The sum of "+num1+" and " +num2+" is : "+sum);
}

}

my question is how can i linked them and see if its compiles if i dont know whats inside the MainClass.class

i hope my question is clear

  • 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-13T08:47:51+00:00Added an answer on June 13, 2026 at 8:47 am

    I’d recommend, as Edwin Dalorzo said, to try decompiling the .class. But for what you’re doing. You would:

    1. Compile App.java “javac App.java”
    2. Run MainClass.class “java MainClass”

    That will do what you’re trying to say.

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

Sidebar

Related Questions

Lets say i have a file name demo which contains an essay. how can
Lets say I have this model class Egg(models.Model): file = FileField(upload_to='media') img = ImageField(upload_to='media')
Let's say that my project has a main class. I'd love to have public
Lets say I have a text file MyFile.txt with following content: hellosam whatsup mynameisjohn
Lets say we have the following file and [folder] structure in a project with
Lets say i have a text file with following content: Hello! How are you?
Lets say I have a text file with the following data Username User ID
Lets say I have class A defined in .java file, and class B defined
Lets say I have a header file foo.h which declares a struct variable #include
Ok lets say I have a File called File.txt and it contains Hello World

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.