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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:52:18+00:00 2026-06-06T18:52:18+00:00

I’m making a Java program that can solve the roots using the quadratic equation

  • 0

I’m making a Java program that can solve the roots using the quadratic equation by giving a, b, and c.

Here is the main code:

//main file

class Call
{
       public static void main(String args [])
    {
            double a=Double.parseDouble(args[0]);
            double b=Double.parseDouble(args[1]);
            double c=Double.parseDouble(args[3]);

            Receiver r = new Receiver(".");
            if (r.determine(a,b,c)=true)
            {
                    double root1=r.Root;
                    double root2=r.Root2;
                    System.out.println("The first root is +root1");
                    System.out.println("The second root is +root2");


            }
            else
            {
                    System.out.println("Not a number");
            }
    }
 }

Now here’s the class I’m trying to call but couldn’t.

   class Receiver
    {
    public boolean determine(double a, double b, double c)
    {
            double value=b*b-4*a*c;
                    if (value<0)
                            return false;
                    else
                            return true;
    }

    public double Root(double a, double b, double c)
    {
            double value=b*b-4*a*c;
            double root=(-b+ Math.sqrt(value))/(2*a);
            return root;
    }

    public double Root2(double a, double b, double c)
    {
            double value=b*b-4*a*c;
            double root2=(-b- Math.sqrt(value))/(2*a);
            return root2;
    }
    }

I made sure that I compiled the Receiver.java already. But when I compile Call.java, I get this error:

Call.java:14:error:cannot find symbol
      Receiver r= new Receiver();
      symbol: class Receiver
      location: class Call
  • 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-06T18:52:20+00:00Added an answer on June 6, 2026 at 6:52 pm

    Note that I haven’t found constructor public Receiver(String arg), and you’re using it like this, aren’t you missing that?

    If you’re compiling those by yourself from command line ensure, these steps:

    Create package with those class

    // top of Call.java
    package com.mypackage.app;
    
    // top of Receiver.java
    package com.mypackage.app;
    

    Compile those files so that package is created in class structure
    (this will create folders in current location like /com/mypackage/app/)

    javac -d . Call.java Receiver.java
    

    Run the Call class from current location by it’s package name

    java com.mypackage.app.Call
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.