• Register now to get access to thousands of Tutorials, Leaked content, Hot NSFW and much more. Join us as we build and grow the community.

Advertise Here

Advertise Here

Advertise Here

Name Generator in Java

FatBird

Payload Encrypter
F Rep
0
0
0
Rep
0
F Vouches
0
0
0
Vouches
0
Posts
75
Likes
35
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 2 1000 XP
This is a simple java program that will generate the letter or a word that you have been inputted into a bigger letter or word using asterisk (*) symbol.

Sample source code:

  1. import

    java.util.*

    ;
  2. /**
  3. * @title Name generator :D
  4. *@version 1.0
  5. * @author Sherwin Pitao
  6. *
  7. */
  8. public

    class

    Name

    {

  9. public

    static

    void

    main(

    String

    [

    ]

    args)

    {

  10. System

    .out

    .print

    (

    "Enter your Name[Small Caps Only]:"

    )

    ;
  11. Scanner in =

    new

    Scanner(

    System

    .in

    )

    ;
  12. String

    inputedName=

    in.nextLine

    (

    )

    ;
  13. String

    Wordd=

    ""

    ;
  14. String

    [

    ]

    alp=

    {

    " *\n

    * *\n

    *****\n

    * *\n

    \n

    "

    , /*A*/
  15. "******\n

    * *\n

    ******\n

    * *\n

    ******\n

    \n

    "

    ,/*B*/
  16. " *****\n

    * * \n

    *\n

    * * \n

    *****\n

    \n

    "

    ,/*C*/
  17. "******\n

    * *\n

    * *\n

    * *\n

    ******\n

    \n

    "

    ,/*D*/
  18. "*******\n

    *\n

    *****\n

    *\n

    *******\n

    \n

    "

    ,/*E*/
  19. "*******\n

    *\n

    *****\n

    *\n

    *\n

    \n

    "

    ,/*F*/
  20. " *****\n

    * \n

    * ***\n

    * *\n

    *****\n

    \n

    "

    ,/*G*/
  21. "* *\n

    * *\n

    *******\n

    * *\n

    * *\n

    \n

    "

    ,/*H*/
  22. "*******\n

    *\n

    *\n

    *\n

    *******\n

    \n

    "

    ,/*I*/
  23. "*******\n

    *\n

    *\n

    * *\n

    *****\n

    \n

    "

    ,/*J*/
  24. "* *\n

    * *\n

    **\n

    * *\n

    * *\n

    \n

    "

    ,/*K*/
  25. "*\n

    *\n

    *\n

    *\n

    *******\n

    \n

    "

    ,/*L*/
  26. "* *\n

    ** **\n

    * * *\n

    * *\n

    * *\n

    \n

    "

    ,/*M*/
  27. "* *\n

    ** *\n

    * * *\n

    * * *\n

    * *\n

    \n

    "

    ,/*N*/
  28. " *****\n

    * *\n

    * *\n

    * *\n

    *****\n

    \n

    "

    ,/*O*/
  29. "******\n

    * *\n

    * *\n

    ******\n

    *\n

    *\n

    \n

    "

    ,/*P*/
  30. " *****\n

    * *\n

    * * *\n

    * **\n

    ***** *\n

    \n

    "

    ,/*Q*/
  31. "******\n

    * *\n

    * *\n

    ******\n

    * *\n

    * *\n

    \n

    "

    ,/*R*/
  32. " *****\n

    * \n

    *****\n

    * *\n

    *****\n

    \n

    "

    ,/*S*/
  33. "*******\n

    *\n

    *\n

    *\n

    *\n

    \n

    "

    ,/*T*/
  34. "* *\n

    * *\n

    * *\n

    * *\n

    *****\n

    \n

    "

    ,/*U*/
  35. "* *\n

    * *\n

    * *\n

    * * \n

    *\n

    \n

    "

    ,/*V*/
  36. "* *\n

    * *\n

    * * *\n

    * * * *\n

    * *\n

    \n

    "

    ,/*W*/
  37. "* *\n

    * *\n

    * \n

    * *\n

    * *\n

    \n

    "

    ,/*X*/
  38. "* *\n

    * *\n

    * \n

    *\n

    *\n

    \n

    "

    ,/*Y*/
  39. "*******\n

    *\n

    *\n

    *\n

    *\n

    *******\n

    \n

    "

    /*Z*/

    }

    ;


  40. String

    [

    ]

    pla=

    {

    "a"

    ,"b"

    ,"c"

    ,"d"

    ,"e"

    ,"f"

    ,"g"

    ,"h"

    ,"i"

    ,"j"

    ,"k"

    ,"l"

    ,"m"

    ,"n"

    ,"o"

    ,
  41. "p"

    ,"q"

    ,"r"

    ,"s"

    ,"t"

    ,"u"

    ,"v"

    ,"w"

    ,"x"

    ,"y"

    ,"z"

    }

    ;
  42. int

    ctr =

    inputedName.charAt

    (

    0

    )

    ;
  43. for

    (

    ctr=

    0

    ;

    ctr<

    inputedName.length

    (

    )

    ;

    ctr++

    )

    {
  44. Wordd=

    inputedName.charAt

    (

    ctr)

    +

    ""

    ;
  45. for

    (

    int

    r=

    0

    ;

    r<

    pla.length

    ;

    r++

    )

    {
  46. if

    (

    Wordd.compareTo

    (

    pla[

    r]

    )

    ==

    0

    )

    {
  47. System

    .out

    .print

    (

    alp[

    r]

    )

    ;

    }

  48. }

  49. }


  50. }
  51. }

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.

2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.


Download
You must upgrade your account or reply in the thread to view the hidden content.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

452,501

355,785

355,792

Top