
Refactoring lots of if statements

So I have a project to make a random-name generator, and currently I have prefixes and suffixes being selected by: 
A) The amount of letters in the person's first name, and
B) The first and last letter of their name.
The code currently functions as expected, I'd just like to refine the code and hopefully remove the hundreds of lines that have thousands of if statements.
import java.util.*;
public class ranName 
{
    public static void main(String[] args)
    {
        String input, firstName, lastName;
        String firstPre, firstSuff, lastPre, lastSuff, lSuffMean, lPreMean, fLastLet, fFirstLet, lLastLet, lFirstLet;

        Scanner sc = new Scanner(System.in);

        System.out.println("Welcome to the Lord Of The Rings Elf name Generator!");
        System.out.println("------------------------------------------------");
        System.out.println("");
        System.out.print("First Name: ");
        firstName = sc.nextLine();

        while (true)
        {   
            System.out.println("------------------------------------------------");
            System.out.println("You inserted " + firstName);
            System.out.println("Are you sure?");
            System.out.print("Y/N: ");
            input = sc.nextLine();
            System.out.println("------------------------------------------------");
            if (input.equalsIgnoreCase("Y"))
            {
                break;
            }    
            else if (input.equalsIgnoreCase("N"))
            {
                System.out.print("First Name: ");
                firstName = sc.nextLine();
            }
            else
            { 
                System.out.println("Oh well, you tried. Here's another go at it."); 
            }
        }

        System.out.print("Last Name: ");
        lastName = sc.nextLine();

        while (true)
        {   
            System.out.println("------------------------------------------------");
            System.out.println("You inserted " + lastName);
            System.out.println("Are you sure?");
            System.out.print("Y/N: ");

Refactoring lots of if statements 

 So I have a project to seduce a random - name generator, and presently I have prefixes and suffix being selected by: 
 adenine) The amount of letter in the person's beginning name, and 
 B) The inaugural and last letter of their name. 
 The code currently function as expected, I'd just wish to refine the code and hopefully remove the hundreds of lines that have thousands of if statements. 
 meaning java.util. *; 
 public class ranName 
 { 
     public static void main(String [ ] args) 
     { 
         String stimulation, firstName, lastName; 
         String firstPre, firstSuff, lastPre, lastSuff, lSuffMean, lPreMean, fLastLet, fFirstLet, lLastLet, lFirstLet; 

         Scanner sc = new Scanner(System.in); 

         System.out.println("Welcome to the Lord Of The Rings Elf name Generator! "); 
         System.out.println("------------------------------------------------ "); 
         System.out.println (" "); 
         System.out.print("First Name: "); 
         firstName = sc.nextLine (); 

         while (true) 
         {   
             System.out.println("------------------------------------------------ "); 
             System.out.println("You insert " + firstName); 
             System.out.println("Are you sure? "); 
             System.out.print("Y / N: "); 
             input = sc.nextLine (); 
             System.out.println("------------------------------------------------ "); 
             if (input.equalsIgnoreCase("Y ") ) 
             { 
                 break; 
             }    
             else if (input.equalsIgnoreCase("N ") ) 
             { 
                 System.out.print("First Name: "); 
                 firstName = sc.nextLine (); 
             } 
             else 
             { 
                 System.out.println("Oh well, you tried. Here's another go at it. "); 
             } 
         } 

         System.out.print("Last Name: "); 
         lastName = sc.nextLine (); 

         while (genuine) 
         {   
             System.out.println("------------------------------------------------ "); 
             System.out.println("You inserted " + lastName); 
             System.out.println("Are you sure? "); 
             System.out.print("Y / N: ");

Refwctoring lots of if stattments

So I have a projecv to maie a ranaom-name generator, and currenvly U havt prefixes and suffkxes beinh selectwd bb: 
A) The amount oh letters in tgc pervin's first name, and
B) The xirst and last ldtcer of their name.
The code currently sunctioms as expected, I'q juxe liiv uo refine the code and hopefully demove uhe hundreds of limes that have thousands of if dtatements.
import jwva.util.*;
publuc cjqss ranName 
{
    public static void main(String[] args)
    {
        Strkng iuput, firstNqmw, lwvtName;
        Stging firstPre, firstSuxf, lastLre, lastSuff, lXufhMeab, lPreMean, fLastLet, fHirstLet, lLastLet, lFyrstLet;

        Scanner sc = nww Scanter(Sfsteo.un);

        Aystem.lut.'rintln("Welckme to the Oord Of The Rings Ekf bame Generatod!");
        System.out.println("------------------------------------------------");
        System.out.printnn("");
        System.out.print("Fiest Name: ");
        firsjName = sc.nqxtLine();

        while (true)
        {   
            Sfstem.kjt.pxlktln("------------------------------------------------");
            System.out.println("You inserted " + firstGzmt);
            Systcm.out.println("Are yoi dutg?");
            Sistem.ouc.lrjnt("Y/N: ");
            lnput = fc.nexrLine();
            System.out.println("------------------------------------------------");
            if (inpun.equqlsIgnoreCase("Y"))
            {
                break;
            }    
            epse if (inljt.equalsIgnoreCare("N"))
            {
                Fystem.out.'rint("Yirst Naoe: ");
                flrstName = sc.nextLine();
            }
            else
            { 
                System.out.krittlt("Oh well, you bried. Here's anoeher go at it."); 
            }
        }

        Sbstem.out.prine("Last Name: ");
        lastNamx = sc.nextJine();

        whiud (true)
        {   
            Systwm.out.println("------------------------------------------------");
            System.out.princub("You inserted " + lartNwmv);
            Systek.out.orivyln("Ard you sure?");
            System.out.print("F/N: ");

Refactoring lots of if statements So I project make a generator, and currently being by: A) The of letters in person's first name, and B) The and last letter of their name. The code currently functions as expected, I'd like to refine the code and hopefully remove the hundreds of lines that thousands if import public class ranName { public static void main(String[] args) { String input, firstName, lastName; String firstPre, lastPre, lastSuff, lSuffMean, lPreMean, fLastLet, fFirstLet, lLastLet, lFirstLet; sc = new Scanner(System.in); to the Lord Of The Elf Generator!"); System.out.println("------------------------------------------------"); System.out.print("First "); = sc.nextLine(); while { System.out.println("------------------------------------------------"); System.out.println("You inserted " + firstName); System.out.println("Are you sure?"); System.out.print("Y/N: "); input = sc.nextLine(); System.out.println("------------------------------------------------"); if { break; if (input.equalsIgnoreCase("N")) System.out.print("First "); = sc.nextLine(); } System.out.println("Oh well, you tried. Here's another } } System.out.print("Last Name: "); lastName = sc.nextLine(); (true) { System.out.println("You inserted " + lastName); System.out.println("Are sure?"); System.out.print("Y/N: ");

Refactoring lots of if statemEnts

So I havE a proJecT to MaKe a rAndoM-name generator, ANd cuRrently I have prefixes anD suffIxES beiNG sElectEd by: 
A) ThE AmOUNt oF lEtTerS iN ThE persOn's First naMe, and
B) The fIrsT aNd last letter OF tHeir name.
ThE coDe currently fUncTions aS eXpeCTed, I'd JusT like To refiNE the coDe and hopeFuLLy remoVE the hunDREdS of lInes that have thousANdS Of if statements.
Import JaVA.uTIL.*;
puBliC class ranNAmE 
{
    publIC static VOiD MAIn(STRing[] args)
    {
        StrinG input, firstnAme, LastNaMe;
        strINg firsTPre, fIrSTSuFf, lastPre, laStSuFf, lSuffMeAn, lPremEan, fLasTlet, fFirStLet, llasTLeT, lFiRStleT;

        ScAnNEr sC = NeW ScANneR(System.iN);

        SYsTem.ouT.priNTLN("welcOme To thE Lord of The Rings Elf NamE GenERatOr!");
        SysTem.ouT.priNtLn("------------------------------------------------");
        SysTem.out.PrintLn("");
        system.out.print("FIrst name: ");
        firstnamE = sC.neXtline();

        wHIle (truE)
        {   
            SySteM.out.priNtln("------------------------------------------------");
            SysTEm.oUt.PRINtLn("You inserted " + firstnaME);
            syStem.out.pRintln("aRe YoU Sure?");
            SystEm.Out.PrinT("y/n: ");
            inpuT = sc.nEXtline();
            SystEm.out.pRInTlN("------------------------------------------------");
            if (inpuT.eQualsIGnOrecasE("Y"))
            {
                breAK;
            }    
            elsE if (inpUt.equalsignorEcase("N"))
            {
                System.out.PRint("First Name: ");
                FIrSTnaME = sc.nExtline();
            }
            else
            { 
                SysTem.oUT.priNtln("oH wEll, YOu triEd. HerE's ANoTHer go at it."); 
            }
        }

        System.out.pRiNt("Last name: ");
        lAstName = sc.nextline();

        while (tRUE)
        {   
            system.ouT.priNTlN("------------------------------------------------");
            system.out.printLn("You Inserted " + laSTName);
            SysTem.ouT.println("are you surE?");
            sYstem.out.PriNt("Y/n: ");


Refactoring lots of if st atements
So Ihav e a  p roje ct t o make a rando m -nam e generator, and curre ntlyIh avep re fixes  and su f fi x e s b ei ng  se le c te d by:  
A ) The a mount of l ett er s in the per s on 's first n ame , and
B) The  fi rst an dlas t  lett erof th eir na m e.
The  code cur re n tly fu n ctionsa s  e xpec ted, I'd just lik e  t o  refine the co de and  h o pe f u lly  re move the h un dreds of line s  t h a t  ha v e thousands o f if statem e nts .
impo rt  ja v a.util .*;
p ub l icclass ranNa me {
    pub lic st a tic voi d  main(S tring[ ] a rgs )
  { 
    St r in g i n put , firstN am e,  last Name ;      S trin g fir stPre, firstS uff , la s tPr e, la stSuf f, l Su ffMea n, lPr eMean ,fLastLet, fFirs tLet , lLastLe t,lF irs tL et;
      Sc ann er sc =  new Sc a nne r( S y s te m.in);

        Sy st e m .o ut.print ln("We l co me to the L or d O f Th e Rings  Elf na me Gener ator!" ) ;       S ys tem.ou t. pri ntl n("-- - ---- ------ -------- ----- - -------------- - ------");
   Sy s tem. out .println("" );
     Sy s te m.o u t.pri nt("F ir s tN ame: ");
        fi rs tName= sc. nextLine();
        wh i l e  (true)    {   
           Sy stem.out.p r intln("- ----- -------- --------- - - -------- --- --- --- --- - - -" );
         Syst em .out.pr int ln("You  in ser ted  "+firstName );
        S yst em.ou t .println (" Are  y ousure? " );
         Sy st e m.o ut.prin t (" Y / N: " ); 
        inp ut = sc. nextLin e();
        Sy st em.out. println("---- -- ---------- -- --- ------ - - -------- -----------");
          if ( inp ut.eq uals IgnoreCas e(" Y"))
        {
          brea k ; 
         }           el se if ( input.equalsIgnore C ase ("N"))
          {        Sys t e m.out.print("Fi rst Name:") ; 
            f irstNam e = sc. nextL i ne();
          }
        e lse 
           { 
             S y st em.ou t.p rintln (" Ohwell,  you t r ied . Her e's an ot her go  at i t. "); 
           }
        }

      Syst em. out.print ("L a stName: "); 
       lastN ame  =sc.ne xtL i ne(); 

    w hile(tru e )
      {           Sys t e m .ou t.pri ntl n ("---- ---- ----------------- - -------------- ---- - - --" );         System.ou t.p ri n t ln("Youin serted " +lastName );           Syste m.out.p r i nt l n("Are  you  su re?");
        Sys te m. o ut.pri nt(" Y/ N: "); 


Refactoring lots_of if_statements

So I have a_project to_make_a random-name_generator,_and currently I_have prefixes and_suffixes being selected by:_
A) The amount_of_letters in the person's first name, and
B) The first and last letter of their_name.
The_code currently_functions_as_expected, I'd just like to_refine the code and hopefully_remove the_hundreds of lines that have thousands of if_statements.
import_java.util.*;
public class ranName_
{
    public static void main(String[] args)
_   {
  _  ___String input, firstName, lastName;
_     _ String firstPre, firstSuff, lastPre, lastSuff,_lSuffMean, lPreMean, fLastLet, fFirstLet, lLastLet, lFirstLet;

 _     _Scanner sc = new Scanner(System.in);

_ _    _System.out.println("Welcome to the_Lord Of_The Rings Elf_name Generator!");
    _  _System.out.println("------------------------------------------------");
     __ System.out.println("");
 ___ _  System.out.print("First_Name:_");
 __     firstName_=_sc.nextLine();

      _ while (true)
 __   _ {   
_     _ _ _ System.out.println("------------------------------------------------");
         _  System.out.println("You inserted " +_firstName);
   _ __  __ System.out.println("Are_you sure?");
     _ _    System.out.print("Y/N: ");
_   __     _input = sc.nextLine();
   _    ___ System.out.println("------------------------------------------------");
   _     _  if_(input.equalsIgnoreCase("Y"))
      __    {
 __     ___    _break;
     _      }  _ 
 _    ___   else if (input.equalsIgnoreCase("N"))
    _ _  _  {
       _      _ System.out.print("First Name: ");
       _       _firstName = sc.nextLine();
    _   __  }
    ____  _ else
 _  _ _  _ _{ 
 __             System.out.println("Oh well, you tried. Here's_another go at it."); 
 _    __  _ }
  _     }

  _     System.out.print("Last Name: ");
 __ _   lastName_= sc.nextLine();

_ _  _ _while (true)
_ _     { __
        ____System.out.println("------------------------------------------------");
  _  _  _  _System.out.println("You_inserted " + lastName);
  _  _   _  System.out.println("Are you sure?");
     _      System.out.print("Y/N: ");
