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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:52:27+00:00 2026-05-27T06:52:27+00:00

So essentially this is what I want to do, do{ Object name = new

  • 0

So essentially this is what I want to do,

do{
    Object name = new Object();*Create new object*
    Object.method*run created object through a method*

    Scanner keyboard = new Scanner(System.in);
    System.out.println("Do you wish to continue entering data");
    String answer = keyboard.nextLine();   
 } while (answer.equalsIgnoreCase("Yes"))

Do I need to create arrays to make this work? If so how would that work?

  • 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-27T06:52:28+00:00Added an answer on May 27, 2026 at 6:52 am

    No it would not have to be saved for any reason if you just wanted it to run a program (I assume method).

    Object name;
    Scanner scan = new Scanner(System.in);
    String answer = "";
    
    do {
        name = new Object();
        name.method();
    
        System.out.print("Do you wish to continue entering data? ");
        answer = scan.nextLine().toLowercase(); //Get the response
    } while(!answer.equals("yes"); //If they didn't enter yes then the loop stops
    

    This method also saves you memory because you do not create a new Scanner or new memory each iteration of the loop.

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

Sidebar

Related Questions

I'm writing a cache-eject method that essentially looks like this: while ( myHashSet.Count >
Essentially, what I want to do is this: gcc foo.c -o foo.o ar rcs
I want to create an object that acts as a specific class, such as
I want to take an object, let's say this object: public class BenchmarkList {
So I have a DOM document that looks essentially like this <categories> <category id=1/>
Surely there is some kind of abstraction that allows for this? This is essentially
This questions involves 2 different implementations of essentially the same code. First, using delegate
So I essentially need to do this: String text = line1\n; text += line2\n;
This seems like a basic question, but I haven't found any clear answers. Essentially,
Ok, this might be a weird request, but is it possible to essentially flatten

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.