Cannot instantiate the type Queue. Why is this?

This is my main method for a stacks/queues assignment. I keep getting an error with my queue, but not my Stack. The stack class seems to be working just fine. I’m completely stuck. It says “cannot instantiate type Queue”. Any help would be most appreciated!

 public class mainMeth {

      public static void main(String[] args) throws FileNotFoundException {
            File Polish = new File("fILE4INPUT.txt");
            File out = new File("outfile.txt");

            Scanner f = new Scanner(Polish);
            Queue inputQ = new Queue();
            Stack stack2 = new Stack();
            Queue outputQ = new Queue();

            String word;
            Character ch;

            while (f.hasNext()) {
                String myString = f.nextLine();

                for (int count = 0; count < myString.length(); count++) {
                    ch = myString.charAt(count);
                while (!inputQ.ismtQ()) {
                    ch = inputQ.remfront();

                    if (isAlpha(ch)) {
                        // System.out.println(ch);
                    } else {
                        if (isOperator(ch)) {

                            if (stack2.ismt()) {

                            } else {
                                if (valueOf(ch) > valueOf( {

Leave a Comment