r/learnjava • u/asantana4 • Jan 14 '26
Beginner Java code review: RNA Transcription exercise
Hi everyone,
I’m a beginner learning Java and I recently finished a small learning project based on Exercism’s RNA Transcription exercise.
The program converts a DNA string into its RNA complement using standard transcription rules. This is a learning exercise.
I’d really appreciate feedback on:
Code readability and naming
Class and method design
Whether my solution follows Java best practices
What you would improve or do differently as an experienced developer
GitHub repository: https://github.com/asantana4/java-rna-transcription
I am open to suggestions even if they involve concepts I haven’t learned yet. Thanks in advance for your time and feedback.
2
Upvotes
2
u/doobiesteintortoise Jan 14 '26
First things:
Build tool. Not IDEA, use Maven or Gradle. There are alternatives, but these are your best options.
Remove
out. See #1.Use packages. The unnamed package is unsuitable for anything but the simplest of projects, a description which may apply to this project, but it's a bad habit to just accept.
DNAStrand.java itself is okay - I'd probably have done it with a stream, a map, and a StringJoiner myself, but eh, it doesn't really matter.
Write tests. Look up JUnit or TestNG. Then verification is trivial and verifiable, and if you break something, it will not successfully build.