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 7055029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:41:56+00:00 2026-05-28T03:41:56+00:00

I am an eighth grader with a tight deadline on a java project. I

  • 0

I am an eighth grader with a tight deadline on a java project. I have my GUI all ready to go, except I need to take the two values from the two text fields, and send them to a method in a different class when I press a button. I am having trouble calling the method I need. All important code is below.

Code that is attempting to call the method:

 private void GoButtonActionPerformed(java.awt.event.ActionEvent evt) {                                         

    String Ntextfield = NumberTextField.getText();
    n = Integer.parseInt(Ntextfield);

    String Rtextfield = RateTextField.getText();
    r = Integer.parseInt(Rtextfield);
    //call PermMath class
    PermMath doTheMath = new PermMath();
    doTheMath.permutations(int n, int r);
}  

Method I am trying to call:

class PermMath {
  static long factorial(int num){
      //other code is here
  }
  static long permutations(int n, int r){
        //code I want to call is here
  }
}
  • 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-05-28T03:41:56+00:00Added an answer on May 28, 2026 at 3:41 am

    It seems to me you have two mistakes:

    1. You are passing two temporary integers called n and r instead of passing the two integers you modified earlier in your GoButtonActionPerformed function.
    2. The permutations function is static, so there is no need to actually create an instance of the PermMath class.

    Changing the function call to this should do it:

    PermMath.permutations(n, r);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an IntelliJ project with eight modules and roughly 500 KLines of Java.
I have two arrays: keys_array = [2,4,5,8,9] values_array = ['two','four','five','eight','nine'] I need to get:
Need to run a for loop in jquery. Condition is : i have the
Newbie problem: I have a SQL SP with ten parameters (eight input, two output)
I have several strings that look like the following: +H124005992014011/1527399999999I05Z +H7039700000001/$99999999I051 +K122005962050171/120911234C117 I need
lets say I have a list like so: ['one','two','three','four','five','six','seven','eight','nine'] and I want to experiment
I have an ArrayList<Double> , the values of which are converted into slices of
I have a data set that is around 700 rows with eight columns of
I'm tired of adding ten link libraries into my project, or requiring eight of
I have a string which follows literally : lt;img src=quot;http://www.news.gov.tt/thumbnail.php?file=Hon__Jerry_Narace_Minister__Of_Health_599152837.jpgamp;size=summary_mediumquot;gt;lt;pgt;Fifty-eight people have been tested

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.