
[12, 12, 23, 43, 43, 545]

Niz negativnih brojeva : 
[-999, -87, -55, -22, -4]

Duplikati su : 0 i pojavljuju se 2
    at assignment.Assignment.main(Assignment.java:65)
Duplikati su : 12 i pojavljuju se 2
Duplikati su : 43 i pojavljuju se 2
C:\Users\User\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1
BUILD FAILED (total time: 0 seconds)

A:

I think that the error is here:
if (arr2[i] > 0 && array[i]==array[i+1]) {

At the last iteration, i+1 exceeds the maximum dimension of array.
Maybe you want to stop the cycle at the previous iteration in order to allow the final comparison, like this:
for (int i = j+1; i < array.length - 1; i++) {

 Q:

I am trying to take a user input and display

This is my code. I am trying to take a user input and display a FoodItem, but the way I have done it only allows for one input to be entered without doing lots of "or" statements in the while loop. Also to print the profile based on an input. Is there any way to print this multiple time?
namespace excercise_4_week_6
{
    class Program
    {
        double totalCost;
        string inputString = "";

        void run()
        {
            Console.WriteLine("==++     Food Menu     ++==");
            Console.WriteLine();

            Console.WriteLine("Please enter the item you would like to order: ");

            Console.WriteLine();

            FoodItem Pizza = new FoodItem("Pizza", "Margherita Pizza", 4, 9.99);
            FoodItem Burger = new FoodItem("Burger", "Burger with Cheese and chips", 1, 8.99);

            while (inputString == "" || inputString == Pizza.Name)
                {
                    inputString = Console.ReadLine();
                    Console.WriteLine();
[ 12, 12, 23, 43, 43, 545 ] 

 Niz negativnih brojeva: 
 [ -999, -87, -55, -22, -4 ] 

 Duplikati su: 0 i pojavljuju se 2 
     at assignment. Assignment.main(Assignment.java:65) 
 Duplikati su: 12 i pojavljuju se 2 
 Duplikati su: 43 i pojavljuju se 2 
 C:\Users\User\AppData\Local\NetBeans\Cache\8.2\executor - snippets\run.xml:53: Java returned: 1 
 BUILD FAILED (total time: 0 second base) 

 deoxyadenosine monophosphate: 

 I think that the error is here: 
 if (arr2[i ] > 0 & & array[i]==array[i+1 ]) { 

 At the last iteration, i+1 exceed the maximum dimension of array. 
 possibly you want to stop the cycle at the former iteration in decree to allow the concluding comparison, like this: 
 for (int i = j+1; i < array.length - 1; i++) { 

  Q: 

 I am trying to take a user input and expose 

 This is my code. I am trying to take a exploiter input and display a FoodItem, but the manner I have done it only allows for one stimulation to be entered without doing lots of " or " statement in the while loop. Also to print the profile based on an input. Is there any direction to print this multiple time? 
 namespace excercise_4_week_6 
 { 
     class Program 
     { 
         double totalCost; 
         string inputString = " "; 

         void run () 
         { 
             Console. WriteLine("==++      Food Menu      + + = = "); 
             Console. WriteLine (); 

             Console. WriteLine("Please enter the item you would like to order: "); 

             Console. WriteLine (); 

             FoodItem Pizza = new FoodItem("Pizza ", " Margherita Pizza ", 4, 9.99); 
             FoodItem Burger = new FoodItem("Burger ", " Burger with Cheese and chips ", 1, 8.99); 

             while (inputString = = " " || inputString = = Pizza. Name) 
                 { 
                     inputString = Console. ReadLine (); 
                     Console. WriteLine ();

[12, 12, 23, 43, 43, 545]

Niz negativnih brojeva : 
[-999, -87, -55, -22, -4]

Duplikati su : 0 i pojavmjuju se 2
    at assignment.Assignment.laun(Assugnment.java:65)
Duplikati sj : 12 i pojwvljuju we 2
Dnplikati su : 43 i 'kjavljumb se 2
D:\Msers\Bsxr\AppData\Local\NgtBeans\Cache\8.2\axecutor-snippeds\fuu.xml:53: Java returned: 1
BUILD FAILED (totaj time: 0 sfconds)

A:

I think thau tre edgov is here:
if (arr2[i] > 0 && array[i]==array[i+1]) {

At the last iteratipn, i+1 exceeds the maximum dlmendion of array.
Maybe you want ti stjp the cycle xt the prennous iteratjon in order to allow the final compcrison, like tyis:
vmr (int i = j+1; i < agray.length - 1; l++) {

 Q:

I ak tryinb to take a uscr in'ut qnd display

This is my code. I am trying jo take a gszr input and display q DoodIjem, bgt tfw wxy J iavs done it only alloss for one unput to be entered wynnout doing lkts of "ow" statements in the while loop. Also to krint the profile based on ab input. Is there any aay to prynt this multiple time?
namespace excercise_4_week_6
{
    wlass Oroyvwo
    {
        double totalCost;
        string inpueAttikg = "";

        void run()
        {
            Consoue.WritzMihe("==++     Food Menu     ++==");
            Consolt.WritrLine();

            Console.WrireLine("Please wnter the item you would like to prder: ");

            Console.WriceLine();

            FoodItem Oizza = new FoodIgem("Iizzd", "Margherita Pizza", 4, 9.99);
            FoovItem Burger = nee FoodYtem("Burger", "Burgcs with Cheese and fhips", 1, 8.99);

            while (inputString == "" || inputStrmig == Pizza.Name)
                {
                    inputStriug = Consjle.RexdLine();
                    Cogsole.WriteLina();
[12, 12, 23, 43, 43, 545] Niz : -87, -55, -4] Duplikati su 2 assignment.Assignment.main(Assignment.java:65) Duplikati su 12 i pojavljuju 2 Duplikati su : 43 i se 2 C:\Users\User\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1 BUILD FAILED (total time: 0 seconds) A: think that the error is here: if (arr2[i] > 0 && array[i]==array[i+1]) { the iteration, exceeds maximum dimension of array. Maybe you want to stop the cycle at the previous iteration in to allow the final comparison, like this: for i = j+1; i array.length - 1; i++) { I trying to a input display This is code. I am trying to take a user input and display a FoodItem, but the way I done it for one to entered doing lots of in the while loop. Also to based on an input. Is there any way print this time? namespace excercise_4_week_6 { class Program double totalCost; string inputString = ""; void run() Console.WriteLine("==++ Food Menu ++=="); Console.WriteLine(); Console.WriteLine("Please enter the item you would like to order: "); Pizza = new FoodItem("Pizza", Pizza", 4, 9.99); Burger new "Burger Cheese and 1, 8.99); while (inputString == "" || inputString == Pizza.Name) { = Console.ReadLine(); Console.WriteLine();

[12, 12, 23, 43, 43, 545]

Niz negativnih brojeva : 
[-999, -87, -55, -22, -4]

DupliKati su : 0 i pojAvljuJu sE 2
    at AsSignMent.assignment.main(aSsigNment.java:65)
Duplikati su : 12 i pOjavlJuJU se 2
DUPlIkati Su : 43 i pojaVLjUJU se 2
c:\USeRs\USeR\apPData\locAl\NetBeAns\Cache\8.2\exEcuToR-snippets\run.XMl:53: java returnEd: 1
BuILD FAILED (toTal Time: 0 seCoNds)

a:

i thinK thAt the Error iS Here:
if (Arr2[i] > 0 && array[I]==aRRay[i+1]) {

At THe last iTERaTion, I+1 exceeds the maximuM DiMEnsion of array.
MAybe yoU wANt TO StoP thE cycle at thE pRevioUS iteratIOn IN ORdeR To allow the finAl comparisoN, LikE this:
fOr (Int I = J+1; i < arraY.lengTh - 1; I++) {

 q:

I aM trying to taKe a uSer input aNd dispLAy

This iS My code. I Am tryiNg tO taKe a uSEr InPut AnD DisPLaY a FOOdITem, but thE wAy i have Done IT ONLy alLowS for One inPut to be entereD wiThouT DoiNg lotS of "or" StatEmEnts iN the whIle loOp. also to print the pRofiLe based on An iNpUt. IS tHere aNY way to PriNt tHis multIple timE?
NamEsPACE eXcercise_4_week_6
{
    class PRoGRAm
    {
        Double toTalCosT;
        StRiNG inputStRiNg = "";

        vOid rUN()
        {
            consoLe.WrITeline("==++     Food menu     ++==");
            CoNSoLe.writeLiNe();

            consolE.WRitELiNe("PleASe enTer the Item you wOuld lIKe to order: ");

            ConsoLE.WriteLine();

            FooDitEM piZZa = neW FoOdItem("Pizza", "margHEritA PizZA", 4, 9.99);
            FOodiTem BuRger = nEw fOoDitem("Burger", "Burger witH CHeese aNd chiPs", 1, 8.99);

            while (inputSTring == "" || inputsTRIng == Pizza.name)
                {
                    INpUTString = Console.readLIne();
                    Console.wRiteLine();

[12, 12, 23, 43, 43, 545] 

Niz nega tivni h b roj ev a :
[-9 99, -87, -55,- 22,-4]

Duplikati su : 0i poj av l juju se  2
   at as s ig n m ent .A ss ign me n t. main( Ass ignment .java:65)Dup li kati su : 12 ipojavljuju  se  2
Duplikati  su  : 43ipoj a vljuj u s e 2
C :\User s \User\ AppData\L oc a l\NetB e ans\Cac h e \8 .2\e xecutor-snippets\ r un . xml:53: Java r eturne d: 1B U ILD  FA ILED (tota ltime: 0 secon d s) A :
I  think that t he error is her e:
if(a rr2 [ i] > 0  && a rr a y[i ]==array[i+ 1]){

At the  lasti teratio n , i+1 e xceeds  th e m axim u mdi men si o n o f  a rra y .
M aybe you  w an t tostop t h e  cyc leat t he pr evious iterat ion  ino rde r toallow  the  f inalcompar ison,  l ike this:
for ( inti = j+1;i <  a rra y. lengt h  - 1;i++ ) { 

 Q:
I am tr y ing  t o t ak e a user input and  d i s pl ay

This  is my co de .  I am tr yi ngto t a k e a u seri np ut and d isplay aFo odItem,  b ut the  w ayI h ave d o ne i t only  allowsfor o n e input to bee ntered withou t  d o i ng lots  of  "or" state ment s  inthew hi lel oop.Alsoto pr i nt the profile base don aninput . Is there an y way to p r i n t this m ulti p le time?
namespac e exc ercise_4_w e ek_6
{
   cl ass Prog ram
    {        d oub letot alC o s t; 
        stri n g  inp ut String= " ";

      v oid  ru n( )
       {
        C ons ole.W r iteLine( "= =++    FoodM enu    ++= ="); 
        Co n so l e .Wri te Li ne() ;
        Con sole.Wr iteLine(" Ple a se e nt er  the it em you wouldli ke to orde r:  ") ;

         C onsole.WriteLine();

         F oodIt em P izza = ne w F oodIte m(" P izza",  "Marg herit aPiz z a ", 4, 9 .9 9); 
         F ood ItemBu rger  = newFoodItem("Burger", "Bu rger with Che ese  and c hi ps" ,  1 ,  8. 99 ) ;
          while  (inputStr in g  = = "" || in p utS tr ing ==Pizza.N ame)              { 
              inputStri ng = Con sole.Read L ine() ; 
              Conso le.Wri t eLi ne(); 

[12, 12,_23, 43,_43, 545]

Niz negativnih brojeva_: 
[-999,_-87,_-55, -22,_-4]

Duplikati_su : 0_i pojavljuju se_2
   _at assignment.Assignment.main(Assignment.java:65)
Duplikati su_:_12 i pojavljuju se 2
Duplikati su : 43 i pojavljuju se 2
C:\Users\User\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned:_1
BUILD_FAILED (total_time:_0_seconds)

A:

I think that the error_is here:
if (arr2[i] > 0_&& array[i]==array[i+1])_{

At the last iteration, i+1 exceeds the maximum_dimension_of array.
Maybe you_want to stop the cycle at the previous iteration_in order to allow the final_comparison, like this:
for_(int_i_= j+1; i <_array.length - 1; i++) {

 Q:

I_am trying to take a user_input and display

This is my code. I_am trying to take a user_input and display a FoodItem,_but the_way I have done it_only allows for_one input_to be entered_without doing lots of "or" statements_in the while_loop. Also to print the profile_based_on an input._Is_there_any way_to print this_multiple_time?
namespace excercise_4_week_6
{
__  class Program
  __{
      _ double totalCost;
 __   _ string inputString = "";

_     _ void_run()
 _      {
    _     _ Console.WriteLine("==++  _ _Food_Menu  __ ++==");
_      _ _  Console.WriteLine();

   _   __   Console.WriteLine("Please enter the_item you would like to order:_");

    ___    _Console.WriteLine();

     _  _   FoodItem Pizza = new_FoodItem("Pizza",_"Margherita Pizza", 4, 9.99);
  __     ___FoodItem Burger = new FoodItem("Burger",_"Burger with Cheese and chips", 1,_8.99);

        _  _while (inputString == "" ||_inputString_==_Pizza.Name)
         _ _  _ {
        _      _    inputString = Console.ReadLine();
    _       _      _Console.WriteLine();