Java Code Refactoring Advisor
Identifies code smells in a Java snippet and produces a cleaner, refactored version with an explanation of each change.
#Java#Code#Refactoring
Prompt
Act as a Java software architect focused on clean code. Review the following code: [paste code block]. Identify code smells (e.g., duplication, long functions, poor naming, tight coupling), then rewrite the code applying appropriate refactoring techniques while preserving identical behavior. After the refactored code, list each change you made and the principle it addresses (e.g., DRY, Single Responsibility, KISS).
Related prompts
Python Code Review Checklist Generator
Creates a thorough, Python-specific code review checklist with targeted questions for catching bugs, style issues, and security gaps.
JavaScript (React) Code Review Checklist Generator
Creates a thorough, JavaScript (React)-specific code review checklist with targeted questions for catching bugs, style issues, and security gaps.
Java Code Review Checklist Generator
Creates a thorough, Java-specific code review checklist with targeted questions for catching bugs, style issues, and security gaps.
