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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:08:36+00:00 2026-06-05T07:08:36+00:00

I have a java program that runs automatically every morning and contains several methods

  • 0

I have a java program that runs automatically every morning and contains several methods that are all independent of each other. Sometimes I have to do testing, so I will comment out all of the methods I am not using. This is a problem bc sometimes I forget to uncomment the code and the program may run for a few days without anyone catching on that its not completely running.

Is there any way to set up an automated check for this?

Solution: I have decided to add a counter to count the number methods that run and return an error when the number is wrong.

  • 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-05T07:08:37+00:00Added an answer on June 5, 2026 at 7:08 am

    Auditing for randomly inserted comments? Bad idea.

    Use revision control, like Git for your project, if you aren’t already. Then things get really simple:

    (if you already use revision control, then look down at #2, and ignore the rest of my answer)

    enter image description here

    1. In the above image the ‘Remote repository’ would be where you store the pristine, current development version (no testing-comments).

    2. Set up your unit tests to execute by pulling the latest sources from this repository.

    3. For hacking around, pull yourself a separate copy (in the image ‘Local repository’, and its corresponding ‘Working directory’) and do your commenting/uncommenting/testing there.

    4. Unless you ‘push’ your changes to the ‘Remote repository’, your unit tests will run with the non-commented, clean version available on the ‘Remote repository’.

    5. When you are done testing and have something worthwhile added to the code, commit and ‘push’ to the ‘Remote repository’.

    6. Next time the tests run, they will have the new (good) code.

    7. Profit.

    NOTE: ‘Remote repository’ and ‘Local repository’ are really just terms. They can all be on the same machine too.

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

Sidebar

Related Questions

I have a Java program that runs a number of other programs. Once the
I have a Java program that runs many small simulations. It runs a genetic
I have a Java program that runs on my Ubuntu 10.04 machine and, without
I have a Java program that executes from Spring Qquartz every 20 seconds. Sometimes
I have an java program that runs external programs executing commandline parameters. After making
I have a Java program that runs in the background without any UI. Can
I have developed a java program that runs fine in Mac OS X (10.6.7).
In eclipse I have a java project that runs an external program (a .exe)
Sorry, Im sort of new to java, and I have a program that runs
On Mac OSX 5.8 I have a Java program that runs at 100% CPU

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.