i want to write a code to generat passwords but, a random generator method inside it not changing its value, can i get a solution to this d analternative way to generate password using matric number of the form s60202003
GeSHi (java):
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package key;
/**
*
* @author HARLEY
*/
import java.io.*;
import java.util.*;
public class Main {
int jack = 60 ;
int adme = 1;
while ((line = in.readLine())!= null) {
//int num = line.hashCode();
//int namei = Integer.parseInt(line.substring(7));
int numt = rand.nextInt(50);
if (line.length()>3) {
adme += 1;
Formatter formato = new Formatter();
int sys =
Integer.
parseInt(line.
substring(7));
sys = 64 +sys;
// namei = jack + namei;
//int js = line.substring(6);
char form = (char) (sys);
String hnome =
(formato.
format("%c",sys
).
toString());
String nam = hnome.
toLowerCase();
//String suname = name.substring(2);
//char col = line.charAt(3);
//int num = line.hashCode();
//int nnum = Math.abs(num);
/**
Formatter formato = new Formatter();
String hnome = (formato.format("%d",jack).toString());
String hname = hnome.substring(0,2);
String hname2 = hnome.substring(3,5);
int nonam = line.length();
String namea = line.substring(0,1);
out.write(hname+hnome);
*/
System.
out.
println(nam+adme+numt
);
out.write("");
out.newLine();
}
}
in.close();
out.close();
}
}
Created by GeSHI 1.0.7.20