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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:27:17+00:00 2026-05-14T16:27:17+00:00

I try to be as minimalist as possible. Repetition is a problem. I hate

  • 0

I try to be as minimalist as possible. Repetition is a problem. I hate it. When is it really a problem?

  1. what is static-overuse?
  2. what is field-method overuse?
  3. what is class-overuse?
  4. are there more types of overuse?

Problem A: when it is too much to use of static?

    private static class Data
    {
            private static String fileContent;
            private static SizeSequence lineMap;
            private static File fileThing;
            private static char type;
            private static boolean binary;
            private static String name;
            private static String path;
    }

    private static class Print
    {
            //<1st LINE, LEFT_SIDE, 2nd LINE, RIGHT_SIDE>
            private Integer[] printPositions=new Integer[4];                

            private static String fingerPrint;
            private static String formatPrint;

    }

Problem B: when it is too much to get field data with private methods?

    public Stack<Integer> getPositions(){return positions;}
    public Integer[] getPrintPositions(){return printPositions;}


    private Stack<String> getPrintViews(){return printViews;}
    private Stack<String> getPrintViewsPerFile(){return printViewsPerFile;}
    public String getPrintView(){return printView;}

    public String getFingerPrint(){return fingerPrint;}
    public String getFormatPrint(){return formatPrint;}


    public String getFileContent(){return fileContent;}
    public SizeSequence getLineMap(){return lineMap;}
    public File getFile(){return fileThing;}
    public boolean getBinary(){return binary;}
    public char getType(){return type;}
    public String getPath(){return path;}

    public FileObject getData(){return fObj;}
    public String getSearchTerm(){return searchTerm;}

Related

  • interface overuse
  • overuse of static in a Game
  • 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-14T16:27:17+00:00Added an answer on May 14, 2026 at 4:27 pm

    are there more types of overuse?

    Yes … overuse of dogmatism.

    You need to develop a balanced understanding of when it is appropriate to use these constructs (statics, fields, methods, classes, interfaces etc), and when it is not appropriate. Simply trying to avoid the use of some construct is plainly wrong-headed.

    For example, but static fields have the problem that there can only be one instance of the field in the entire JVM. This means that code using statics tends to be non-reentrant, which can make it unusable in a lot of situations; e.g. when there are multiple threads or recursion is involved. However, there are situations where you need there to be only one instance in the entire JVM, and in those situations statics are perfectly acceptable.

    (The above is an oversimplification of the issues of statics. I am trying to illustrate how you should be thinking about these things. Understand the pros and cons, and judge each case on its merits not on the basis of some dogma that you heard / read somewhere.)

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

Sidebar

Related Questions

Ill try and make this as clear as possible. I have a contact form
i try to write my own control.But my control' html has problem: Look like
I'm trying to refactor some code to achieve more throughput through parallelism. I did
Try this in chrome versus firefox/IE: var cancelPressed = false; function redirect() { //window.location
I try to use tag audio. Convert mp3 to ogg use ffmpeg -i 123.mp3
I try to debug my silverlight application that contain OpenFileDialog.ShowDialog() call - and i
im try to catch a fileupload from my Flashfile, this sends it with $_POST
I try to install rails version 2.3.4 with rvm rvm gem install --no-ri --no-rdoc
I try to attach action Events on the JCombobox arrow JButton. So I make
I try to show some information inside of <div> as following: <div id=show_details style='display:block;'

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.