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

  • Home
  • SEARCH
  • 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 8674469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:43:06+00:00 2026-06-12T19:43:06+00:00

I am new to java and netbeans. I am trying to write a program

  • 0

I am new to java and netbeans. I am trying to write a program that requires user input. This is my code:

public class Arrays {

  public static void main(String[] args){
  }

  private double[] readNumbers(){
      final Input in = new Input();
      System.out.print("How many numbers will you enter?: ");
      final int count = in.nextInt();
      final double[] list = new double[count];
      for (int i = 0; i < count; ++i){
          System.out.print("Enter next number: ");
          list[i] = in.nextDouble();
      }
      return list;
  }
}

In line final Input in - new Input(); Netbeans underlines Input saying that it cannot find symbol. However I practically copied this code from the textbook so I don’t understand what the problem is. I thought maybe I needed to import java.io, but that did not solve the problem. Really sorry if this is a stupid question, but any help would be really appreciated.

Thank you!

  • 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-12T19:43:07+00:00Added an answer on June 12, 2026 at 7:43 pm

    Looks like your text book has some class definition that you forgot to import to your project.
    If you like to , change your code like,

    final Input in = new Input();
    

    to

    final Scanner in = new Scanner(System.in);
    

    If you don’t want to change your code, then look few pages up and down the pages from where you got this code, you should see Class named Input , some what similar to this :

    class Input{
    
        public int nextInt(){
             Scanner sc=new Scanner(System.in);
             return sc.nextInt();
        }
    
        public double nextDouble(){
             Scanner sc=new Scanner(System.in);
             return sc.nextDouble();
        }
    
    }
    

    Which is basically, an extra unnecessary work.
    Include that in your project, and it should run fine.

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

Sidebar

Related Questions

I'm trying to debug a method in Java using NetBeans. That method is: public
I'm trying to debug a method in Java using NetBeans. That method is: public
I'm new at Java GUI and I'm trying to make a program that shows
i m new with netbeans platform , i want to use java class's method
I'm new to JAVA and I'm currently trying out both Netbeans and Eclipse. I'm
I've been trying to figure out why this Java program I am trying to
I'm a fairly experienced Java user, but I've just started trying to use NetBeans
Mac OSX Netbeans JAVA Goal: BlackJack program... Im trying to get an imageIcon of
I am very new to Java and also Real Time Program. I am trying
I m working with NetBeans, and I m trying to program a program that

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.