0

I am new to coding (and this site) and want to know if it would be appropriate to post asking for help refactoring. I do not know how to simplify or refactor anonymous inner classes. I guess I could place the whole thing in its own method but I'm wondering if there are other solutions. I am using action listener to add elements to a table and it is working as intended. The issue I am having is that my anonymous inner class is rather huge and I don't really know how to refactor those.

What solution is generally used when anonymous inner classes get too big? Can it be simplified with lambda expressions (I know I would need to post the code for this to be answered/answerable)?

These questions seem like they might be too vague to be acceptable on this website so I wanted to know if it was appropriate to ask for help with this here. If not here, does anybody have any suggestions for other websites or more education on the topic?

8

There is a site on Stack Exchange that is dedicated to Code Review. You can ask people there to look over your code and provide you with suggestions to improve it.

But before asking questions there, please make sure your code is working and as well written as you you think it can be. It is not about asking questions how to implement something.

It should be like so: You've written some feature, tried your absolute best to let it be as high quality as you can and then you pass it to a coworker to have a look on it.

If you think that some code can be improved but you don't know how and it's not very specific, then try it on Software Engineering. This site fits well for questions like: "What solution is generally used when anonymous inner classes get too big?"

But before asking there, please make sure to write a good question as you would write it on Stack Overflow. It's less about implementation details but more about design of your code, so make sure you are on-topic.

|improve this answer|||||
2

I think the site you may be looking for is the Code Review Stack Exchange but, if you decide to ask there, be sure to take their Tour and read their On-topic help page first.

|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged .