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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:42:02+00:00 2026-06-12T16:42:02+00:00

I am receiving the following three cannot find symbol errors, and I am not

  • 0

I am receiving the following three cannot find symbol errors, and I am not sure why!

GrammerQueue.java:9: cannot find symbol
symbol  : constructor GrammerStructure()
location: class GrammerStructure
public class GrammerQueue extends GrammerStructure implements StringQueue{
           ^
GrammerQueue.java:45: cannot find symbol
symbol  : variable stack
location: class GrammerQueue
           this.stack += tmpAr[i];
                ^
GrammerQueue.java:47: cannot find symbol
symbol  : variable count
location: class GrammerQueue
       this.count--;
            ^
3 errors

I got this error on another script and solved it by calling a new object of that type instead of directly calling the object my class creates. However, I’m not even trying to create an object yet! What can I do?

Here’s the code:

import java.lang.*;

public class GrammerQueue extends GrammerStructure implements StringQueue {

    private String queue = "";
    private String structName;

    // @override
    public boolean offer(String item) {
        if (item.length() == 0) // We don't accept empty Strings!
            return false;
        else if (this.queue.length() == 0) // If new queue, just add - no null.
            queue = item;
        else
            // Append null and item for seperation.
            queue += "\0" + item;
        return true; // done.
    }

    // @override
    public String[] asArray() {
        // Splits the string at each null character and returns it as an array.
        String[] array = this.queue.split("\0");
        return array;
    }

    // @override
    public void GrammerStructure(String structureName) {
        this.structName = structureName;
    }

    // @override
    public String take() throws EmptyException {
        // If empty, throw errors.
        if (this.queue.length() == 0)
            throw new EmptyException(structName);
        String[] tmpAr = this.asArray();
        // Empties the stac now that we have it in a temp array.
        this.queue = "";
        // FIFO, so exclude first element in reconstruction.
        for (int i = 1; i < tmpAr.length; i++)
            this.stack += tmpAr[i];
        // We made it this far without error, so reduce count.
        this.count--;
        // Return the first item.
        return tmpAr[0];
    }

    // @override
    public String peek() {
        // Empty string check.
        if (this.queue.length() == 0)
            return null;
        String[] tmpAr = this.asArray();
        // Return the first item.
        return tmpAr[0];
    }

    // @override
    public int size() {
        if (this.queue.length() == 0)
            return 0;
        String[] tmpAr = this.asArray();
        return tmpAr.length;
    }

    // @override
    public void clear() throws EmptyException {
        // If empty, throw errors.
        if (this.queue.length() == 0)
            throw new EmptyException(structName);
        else
            this.queue = ""; // Empty now.
    }

    public void main(String args[]) {}
}
  • 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-12T16:42:04+00:00Added an answer on June 12, 2026 at 4:42 pm

    It looks like you don’t have a stack and count variable. You need to declare and define them, and create getters and setters probably.

    You need to import a package for GrammerStructure, assuming GrammerStructure is in a different package.

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

Sidebar

Related Questions

I'm currently receiving the following errors in wifi communication: Cannot refer to a non-final
I am receiving an error on the following line of code: Object reference not
I am receiving the following error: The buffer manager cannot create a temporary storage
I would like to do the following, but I'm not sure I'm using the
Oracle 11g SQL Server 2008 R2 I am receiving the following errors when trying
Background I'm receiving the following error when trying to render a partial view in
I am receiving the following error in PHP Notice undefined offset 1: in C:\wamp\www\includes\imdbgrabber.php
I am receiving the following error in my code (c#, .Net 3.5, VS2008) when
I am receiving the following error when I try to send mail using a
I seem to be intermittently receiving the following error: BigQuery error in query operation:

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.