No video

How to make a Password Generator in Java

  Рет қаралды 27,529

CodingWithTim

CodingWithTim

Күн бұрын

This is a beginner-friendly tutorial on a java program that randomly generates passwords with numbers, lower case characters, and upper case characters.
Want to see more java tutorial? Check out my channel!
If you find the video helpful, leave a like and subscribe!

Пікірлер: 31
@raulcrespo8563
@raulcrespo8563 3 жыл бұрын
great tutorial! now im trying to give this some functionalities, like choose if you want only lowercases, not numbers etc. as well as implementing anagrams from words user inputs! thank you
@pritisinghvi2472
@pritisinghvi2472 3 жыл бұрын
Very good coding. One thing I would change is to add numbers and symbols to make the password more secure.
@CodingWithTim
@CodingWithTim 3 жыл бұрын
I added numbers, but yea you can also add symbols to my code. Just create another String variable and store the symbols you want to include similar to the way you did for the alphabet.
@pritisinghvi2472
@pritisinghvi2472 3 жыл бұрын
@@CodingWithTim Aw shoot didn't see that. Still, very nice job. You earned a sub.
@Tod357
@Tod357 2 жыл бұрын
@@pritisinghvi2472 and dont forget to change 3 to 4
@gaiusmarius6291
@gaiusmarius6291 3 жыл бұрын
Hi Tim, QQ: I noticed that the password generator does not generate other numbers besides 0.
@CookeiCutter
@CookeiCutter 2 жыл бұрын
Late reply, but change the 0 to 10 in the (int)(0 * Math.random()) in the switch case 0
@JoseMartinez-tj1oj
@JoseMartinez-tj1oj 2 жыл бұрын
Thank you so much, this will help me a lot with my university's assignment!
@skbionic6115
@skbionic6115 3 жыл бұрын
great tutorial, appreciate it
@rachelquijano632
@rachelquijano632 Жыл бұрын
In your current code the number outputted will always be zero because of 0 * Math.random(), it should be 10 * Math.random(). Hope this helps!
@akhileshkumartyagi9932
@akhileshkumartyagi9932 Жыл бұрын
Great video , this will help me a lot
@SorryDaSlayer
@SorryDaSlayer 3 жыл бұрын
mine will not outprint the password can you help me?
@SorryDaSlayer
@SorryDaSlayer 3 жыл бұрын
Heres the code I dont need the random letters or lowercase just the numbers
@SorryDaSlayer
@SorryDaSlayer 3 жыл бұрын
package generat1000passwords; import java.util.Scanner; public class Generate1000Passwords3 { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter password length 1 - 9 "); System.out.println(" Minimum : 100000000 "); System.out.println("Maximum : 999999999 "); String password = ""; //input int passLength = input.nextInt(); //processing for (int i = 0; i < passLength; i++) { int randomNumber = (int) (Math.random() * 9) + 1; } //output System.out.println(password); } }
@SorryDaSlayer
@SorryDaSlayer 3 жыл бұрын
this is the outcome it gives me : Enter password length 1 - 9 Minimum : 100000000 Maximum : 999999999 4 BUILD SUCCESSFUL (total time: 1 second)
@CodingWithTim
@CodingWithTim 3 жыл бұрын
​@@SorryDaSlayer you got an error because you didn't store the randomNumber you calculated into the password variable. You need to add password += String.valueOf(randomNumber); 1 line after int randomNumber = (int) (Math.random() * 9) + 1; in the for loop
@peddiramya8563
@peddiramya8563 Жыл бұрын
Why did you take 3* in the line of int rand
@andrewijaya2162
@andrewijaya2162 3 жыл бұрын
int rand = (Int)(3*math.random()); can you tell what this (int) does ?
@CodingWithTim
@CodingWithTim 3 жыл бұрын
(int) casts the value behind it into an integer
@funkyprogrammer2996
@funkyprogrammer2996 6 ай бұрын
can u tell me why you multiplied "math.random by 3" @@CodingWithTim
@AK-nu9up
@AK-nu9up Жыл бұрын
Is it good for external project
@DoomDilemma
@DoomDilemma 2 жыл бұрын
thanks good tutorial 👍
@valjohn6870
@valjohn6870 Жыл бұрын
I want to do this with just 6 Upper Case letters and create an interface, for it as well
@dipmalakathale8147
@dipmalakathale8147 Жыл бұрын
error: cannot find symbol pass += String.valueof((int)(0 * Math.random())); how to solve this error
@SM.2003
@SM.2003 9 ай бұрын
valueOf() syntax error
@InapplicableClient
@InapplicableClient 2 жыл бұрын
How to code one's own random method
@germescraft
@germescraft 2 жыл бұрын
LOVE YOU thanks a lot thanks a lot thanks a lot thanks a lot thanks a lot
@mehmetsevilla3147
@mehmetsevilla3147 2 жыл бұрын
Thanks
@gundamfortress
@gundamfortress 8 ай бұрын
Sorry, but there are plenty of better basic methods to generate a password in Java... 😒
@Phaminh-Cinematography
@Phaminh-Cinematography Жыл бұрын
What the hell lol
How to Make Minesweeper in Java (Part 1)
23:23
CodingWithTim
Рет қаралды 17 М.
Пройди игру и получи 5 чупа-чупсов (2024)
00:49
Екатерина Ковалева
Рет қаралды 4,1 МЛН
Вы чего бл….🤣🤣🙏🏽🙏🏽🙏🏽
00:18
ROLLING DOWN
00:20
Natan por Aí
Рет қаралды 11 МЛН
Кадр сыртындағы қызықтар | Келінжан
00:16
Java GUI Tutorial - Make a Login GUI #100
19:49
Alex Lee
Рет қаралды 552 М.
Build a JavaScript random password generator 🔑
12:05
Bro Code
Рет қаралды 16 М.
Java Program #19 - Generate Random Numbers in Java
6:20
Programming For Beginners
Рет қаралды 21 М.
3 Types of Projects That Will Make You a Programmer
8:12
Andy Sterkowitz
Рет қаралды 1 МЛН
Create a Random Password Generator in Java | Beginner Java Project
25:02
JavaScript Password Generator
35:31
Traversy Media
Рет қаралды 131 М.
Mini Python Project Tutorial - Password Generator
18:27
Tech With Tim
Рет қаралды 85 М.
Java Custom Exceptions Tutorial - It's Way Easier Than You Think
14:29
Coding with John
Рет қаралды 154 М.
Learn Java in 14 Minutes (seriously)
14:00
Alex Lee
Рет қаралды 4,7 МЛН
Java Validation: Validating a Password
13:10
Max O'Didily
Рет қаралды 48 М.
Пройди игру и получи 5 чупа-чупсов (2024)
00:49
Екатерина Ковалева
Рет қаралды 4,1 МЛН