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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:20:42+00:00 2026-06-15T17:20:42+00:00

In my textbook it has us creating abstract data type classes, in this case

  • 0

In my textbook it has us creating abstract data type classes, in this case a Stack. It is based off an array, thus bounded. Here is the part of the code generating the message:

package ch03.stacks;

    public class ArrayStack<T> implements BoundedStackInterface<T> 
    {
  protected final int DEFCAP = 100; // default capacity
  protected T[] stack;              // holds stack elements
  protected int topIndex = -1;      // index of top element in stack

  public ArrayStack() 
  {
    stack = (T[]) new Object[DEFCAP];
  }

  public ArrayStack(int maxSize) 
  {
    stack = (T[]) new Object[maxSize];
  }

I believe the protected T[] stack; part is the issue since it does not have a type set, but that is how it is supposed to be, left generic for the user of the class to specify. Here is the message generated in JGrasp:

Note: ch03\stacks\ArrayStack.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

I checked JGrasp help documents but they were of no help.

  • 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-15T17:20:43+00:00Added an answer on June 15, 2026 at 5:20 pm

    You need to go to settings->compiler settings->workspace->flags/args, then find the box that says “compile”. click in the box. You should be able to type in the text area to the right of the box now. Type “-Xlint:unchecked” in the text area, apply, then save. There is a screenshot on this blog: http://comp2210.blogspot.com/ if you get lost somehow. You’ll still get errors when you compile; you can just ignore them and run your program. cheers.

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

Sidebar

Related Questions

By textbook based i mean the author asks the reader questions/mini projects after every
I'm following this awful textbook, going through the basics of create/edit/delete records. The delete
I've looked around online as well as in my textbook and this is confusing
I'm having some trouble figuring out the best/Djangoic way to do this. I'm creating
For the above automaton, the regular expression that has been given in my textbook
I'm working on a program from my C++ textbook, and this this the first
I'm having an asbolute nightmare dealing with an array of numbers which has the
Ok... First off, I know this isn't a new question. But, for some reason
Primer: I'm starting a Java class at UCSD next week and our textbook has
I'm doing this programming exercise out of a textbook where we are given an

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.