Coders Packet

PASSWORD GENERATOR USING JAVA

By KOPPADA NAGA LAKSHMI

It's a simple command-line random password generator. It generates random passwords of a specified length and quantity and displays them to the user.

 

 

 

OUTPUT

 

Technology Used :

Java Programming Language: The core technology used in this code is the Java programming language itself.
 

Classes Used :

Scanner Class  : The java.util.Scanner class is used to read user input from the command line
Math Class       :       The java.lang.Math class is used to generate random numbers.
Thread Class    :    The java.lang.Thread class is used for introducing delays in the program's output.
String Class      :     The java.lang.String class is used for string manipulation, including building and displaying the generated passwords.
 

Working Process In Simple Points :

1. User Input
2. Random Character Generation
3. Password Generation
4. Displaying Output
5. Thread Sleep
6. Displays Output
 
The program starts execution in the main method. It uses the Scanner class to read input from the user via the command line.
 
There it displays the message "How long do you want your password to be?" character by character with a slight delay between each character to create a typewriter-like effect here program reads the desired length of the password (an integer) from the user.
 
It then displays the message "How many passwords do you want?" character by character with a similar delay so that the program reads the number of passwords to generate (an integer) from the user.
 
To clear the screen, it prints 50 empty lines with a brief delay between each line.
 
After clearing the screen, the program prints "Here are your random passwords:" to indicate that it's about to display the generated passwords. The generated passwords are printed to the console.
 
 
 
 
 
 
 

 

Download Complete Code

Comments

No comments yet

Download Packet

Reviews Report

Submitted by KOPPADA NAGA LAKSHMI (Naga)

Download packets of source code on Coders Packet