Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [java]

Java (not to be confused with JavaScript) is a class-based, object-oriented, strongly typed, reflective language and run-time environment (JRE). Java programs are compiled to bytecode and run in a virtual machine (JVM) enabling a "write once, run anywhere" (WORA) methodology.

7 votes
6 answers
8k views

Printing a Hollow Butterfly pattern

I am a beginner to Java and have studied up to loops only. After loops lecture above pattern was given to print as homework. I have successfully managed to print this pattern with following code: <...
4 votes
2 answers
2k views

Small password generator app with GUI, v2

GUI-based pseudo-random password generator. Modification of this app, improved according to suggestions from Code Review users. Additional feature: calculation of time to crack password on average ...
4 votes
2 answers
238 views

Rock Paper Scissors in Java

Any feedback on this code would be greatly appreciated! I am just trying to improve so I can move on to bigger projects. Thank you so much! ...
1 vote
1 answer
36 views

One centralized class to wrap/manage OpenTelemetry

I am learning OpenTelemetry hands-on. I want to add OpenTelemetry manual instrumentation to my Java webapp, but I don't want to do import io.opentelemetry.api.* in ...
0 votes
0 answers
47 views

Dependency that emulates Spring JPA in Spring JDBC with save/saveAll and entities [closed]

I would like to know if someone could test a dependency that I created to facilitate work with JDBC by emulating the way JPA works with save and saveAll and entities in Java Spring. The thing is that ...
17 votes
5 answers
5k views

Small password generator app with GUI

This is a GUI-based random password generator, which supports internationalization. It consists of 6 small classes: Main classes: Application - entry point ...
3 votes
2 answers
158 views

First tic tac toe game. want to see if valid or needs improvement

Just finished my first java class that taught me all the way up to oop and abstract classes. Decided to start some projects over the summer. Started with tic tac toe since it sounded fairly easy to do....
2 votes
0 answers
45 views

Shrinkable Swing toolbar

I was tasked with implementing a toolbar that can be shrinked beyond what's necessary to display its buttons' texts. As a last resort, the buttons should hide their texts and only display their icons ...
9 votes
1 answer
1k views

Generate unique random strings considering collisions

I'm coding a random strings generator. It's working, but I'm not sure if this is efficient. ...
1 vote
0 answers
26 views

Java multithreading with Spring JPA

I have to improve a process that is currently sequential, and i wanna make it multi-thread. This process uses Spring JPA, with spring boot 2 and java 17. I would like to have a feedback on the ...
6 votes
2 answers
325 views

Password generator using Decorator Pattern

I made this password generator I'll use in a simple Android App. I want that it generates a password using a truly random number source, but I don't have idea how to do it by now, so a let a seed ...
1 vote
3 answers
785 views

Random password generator in Java

I made a random password generator in Java using a GUI. In the program, the user can choose the length, and whether to include lowercase letters, uppercase letters, symbols or numbers in the password. ...
5 votes
3 answers
276 views

Command line password generator

I built a random password generator in Java which is meant to be run from the command line. It accepts options for: Length Upper case letters Lower case letters Special characters Numbers The ...
8 votes
4 answers
36k views

Random password generator

I just wrote my first Java class, and I wanted to share it with you and maybe get some quick check from more experiences coders than I am. I want to learn OOP, and Java is just the tool I thought was ...
7 votes
4 answers
1k views

Password Generator, generate password of desired length

While I do know that there are many questions regarding "password generators," I have a different approach and would like to know if it is effective. 1) The below password generator takes on a ...

15 30 50 per page
1
2 3 4 5
726