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

The Archive Base Latest Questions

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

Trying to import a class I made in Dr. Java. I made a simple

  • 0

Trying to import a class I made in Dr. Java. I made a simple class called QuestionObject which has String questionString and an array for answers and then an int which corresponds to the correct answer and corresponding getters, setters, and constructors. Compiles fine. In my other class file, the one with my main method and such called Game, when I try import QuestionObject; I get a ‘cannot resolve’ error in the compiler. I saved the class in the same folder as Game.java. Doing everything in OS X not using command line.

Help please! There’s probably a simple answer, I just can’t find it!

  • 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-28T00:46:57+00:00Added an answer on May 28, 2026 at 12:46 am

    Don’t import the class if both classes are in the same directory and in the default package!
    Try removing the import statement.

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

Sidebar

Related Questions

I'm trying to execute the script with PreparedStatemnent: import java.sql.*; public class DeclaredStatement {
I'm trying Guice. I made a simple example which is very similar to the
I have made a java class that calls other java classes and then prints
I met a problem when trying @Singleton of Guice: import com.google.inject.Singleton; @Singleton public class
I'm trying to use an Objective-C class made in Python to do this but
made a short java program in Bluej upon compiling it and trying to get
I'm trying to run a java class that reads off some values from a
I am trying to build a simple Java GUI (I've been learning for only
I am trying to make a game engine. I have made the Game class
So I made a Server and Client with sockets in Java. I'm trying to

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.