Simple Decode menggunakan Vector
Vector selain bisa menampung banyak nilai, ternyata vector juga bisa menDecode menjadi "Hash Value" seperti di bawah ini :
package javadasar;
import java.util.Vector;
/**
*
* @author rahmad
*/
public class HashVector
{
public static void main(String[] args)
{
String nama="matthew";
Vector vname = new Vector();
vname.add(nama);
System.out.println("decode");
System.out.println("String : "+nama+" =====|> hash : "+vname.hashCode());
System.out.println("");
System.out.println("encode");
System.out.println("hash : "+vname.hashCode()+" ======|> string : "+vname.toString());
}
}
import java.util.Vector;
/**
*
* @author rahmad
*/
public class HashVector
{
public static void main(String[] args)
{
String nama="matthew";
Vector vname = new Vector();
vname.add(nama);
System.out.println("decode");
System.out.println("String : "+nama+" =====|> hash : "+vname.hashCode());
System.out.println("");
System.out.println("encode");
System.out.println("hash : "+vname.hashCode()+" ======|> string : "+vname.toString());
}
}
Komentar
Posting Komentar