Array required, passing as an arguement to contructor which wants an array

Hello again, can you help me with this?
here is the error
C:\jDevl\GameTest.java:19: array required, but Lot649.Ticket1 found
          lotto[0] = new Ticket1(1,2,12,1982, 3, 11, 12, 14, 41, 43, 13);
^
C:\jDevl\GameTest.java:20: array required, but Lot649.Ticket1 found
          lotto[1] = new Ticket1(2,2,19,1982, 8, 33, 36, 37, 39, 41, 9);
^
C:\jDevl\GameTest.java:21: array required, but Lot649.Ticket1 found
          lotto[2] = new Ticket1(3,2,26,1982, 1, 6, 23, 24, 27, 39, 34);
^
HERE IS THE GAMETEST CODE, I BELIEVE THE PROBLEM IS WITH MY CONSTRUCTOR
IN THE TICKET CLASS...
public class GameTest{
     public static void main( String args[]){
          String result = "";
          //fill the lottery array with 5 ticket objects
          Ticket1 lotto = new Ticket1();
          Ticket1 t = new Ticket1();
                              //recNo,mmddyr, n1, n2, n3, n4, n5, n6, n7}
          lotto[0] = new Ticket1(1,2,12,1982, 3, 11, 12, 14, 41, 43, 13);
          lotto[1] = new Ticket1(2,2,19,1982, 8, 33, 36, 37, 39, 41, 9);
          lotto[2] = new Ticket1(3,2,26,1982, 1, 6, 23, 24, 27, 39, 34);
          lotto[3] = new Ticket1(4,3,3,1982, 3, 9, 10, 13, 20, 43, 34);
          lotto[4] = new Ticket1(5,3,3,1982, 3, 11, 12, 14, 41, 43, 14);HERE IS THE TICKET CLASS CODE... dang those arrays, i believe i have messed up somehow with the arrays passing as args.
public class Ticket1{
     private int recNum;
     private int mm;
     private int dd;
     private int yy;
     private int nArray[] = new int[7];
     public Ticket1(){
                    recNum = 0;
                    //drawDate = dDay.getDate();
                    //Date dD = new Date();
                    //drawDate = dDay.getDate();
                    mm = 1;
                    dd = 1;
                    yy = 1900;
                    nArray[0] = 0;
                    nArray[1] = 0;
                    nArray[2] = 0;
                    nArray[3] = 0;
                    nArray[4] = 0;
                    nArray[5] = 0;
                    nArray[6] = 0;
     }//end of constructor
     public Ticket1( int rec, int mon, int day, int year, int n1, int n2,
                     int n3, int n4, int n5, int n6, int n7){
          recNum = rec;
          //drawDate = dDay.getDate();
          //Date dD = new Date();
          //drawDate = dDay.getDate();
          mm = mon;
          dd = day;
          yy = year;
          nArray[0] = checkNum(n1);
          nArray[1] = checkNum(n2);
          nArray[2] = checkNum(n3);
          nArray[3] = checkNum(n4);
          nArray[4] = checkNum(n5);
          nArray[5] = checkNum(n6);
          nArray[6] = checkNum(n7);
     }//end of ticket constructor
     public Ticket1( int recA, int monA, int dayA, int yearA, int arrayName[] ){
          recNum = recA;
          mm = monA;
          dd = dayA;
          yy = yearA;
          nArray[0] = arrayName[0];
          nArray[1] = arrayName[1];
          nArray[2] = arrayName[2];
          nArray[3] = arrayName[3];
          nArray[4] = arrayName[4];
          nArray[5] = arrayName[5];
          nArray[6] = arrayName[6];
     }//end of Ticket1 constructor

Ticket1 lotto = new Ticket1();lotto is not delcare as an array and you wants it to act like an array?
lotto[0] = new Ticket1(1,2,12,1982, 3, 11, 12, 14, 41, 43, 13);
lotto[1] = new Ticket1(2,2,19,1982, 8, 33, 36, 37, 39, 41, 9);you should do :
Ticket1 lotto[] = new Ticket1[5];

Similar Messages

  • How to pass containers to a task when I want to invoke the task?

    Hi experts,
    Does any1 have any ideas about how to pass containers to a task when I want to invoke the task? Because the task has 2 required import element.
    Points will be rewarded.
    Vincent.

    Hi
    Check the links
    Workflow automates the steps and activities in a business process according to predefined procedures and rules.
    Workflow presents information and documents to the appropriate knowledge worker or agent (another entity such as a program) to make a decision or perform an activity.
    Workflow tracks each and every step in the process flow and maintains an ongoing status.
    Workflow also collects and reports all of the metrics associated with the execution and completion of the process.
    Check the below links u will get lot of info..
    http://www.sap-press.com/product.cfm?account=&product=H950
    Workflow
    http://www.sap-img.com/workflow/sap-workflow.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
    For examples on WorkFlow...check the below link..
    http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    http://web.mit.edu/sapr3/dev/newdevstand.html
    Go through the following links on FORK :
    http://help.sap.com/saphelp_nw04/helpdata/en/24/e2283f2bbad036e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/8d/25f1e7454311d189430000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/c5/e4a930453d11d189430000e829fbbd/content.htm
    http://www.insightcp.com/res_23.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSTART/BCBMTWFMSTART.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMDEMO/BCBMTWFMDEMO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMPM/BCBMTWFMPM.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    For more reference on workflow: http://****************/Tutorials/Workflow/Workflow.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/04/9277a346f311d189470000e829fbbd/frameset.htm
    Check these links.
    http://www.sapgenie.com/workflow/index.htm
    /people/ginger.gatling/blog/2005/12/01/link-workflow-business-objects-to-your-collaboration-tasks
    http://help.sap.com/saphelp_nw04/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/content.htm
    http://help.sap.com/saphelp_bw33/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/content.htm
    http://help.sap.com/saphelp_bw31/helpdata/en/8d/25f94b454311d189430000e829fbbd/content.htm
    http://www.sap-press.com/product.cfm?account=&product=H950
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    Workflow
    http://www.sap-img.com/workflow/sap-workflow.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
    For examples on WorkFlow...check the below link..
    http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    http://web.mit.edu/sapr3/dev/newdevstand.html
    http://www.sap-img.com/workflow/sap-workflow.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
    For examples on WorkFlow...check the below link..
    http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    http://web.mit.edu/sapr3/dev/newdevstand.html
    Workflow tutorials with step-by-step and with screenshots are available at http://www.****************/Tutorials/Workflow/Workflow.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/42/c14a9b55103116e10000000a1553f7/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/c5/e4a930453d11d189430000e829fbbd/frameset.htm
    http://www.sapgenie.com/workflow/
    http://www.sap-img.com/workflow/sap-workflow.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    http://web.mit.edu/sapr3/dev/newdevstand.html
    http://www.sap-basis-abap.com/wf/sap-business-workflow.htm
    https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2857887
    https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2855919
    https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2735228
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSTART/BCBMTWFMSTART.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMDEMO/BCBMTWFMDEMO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMPM/BCBMTWFMPM.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    Debug a workflow.
    This has a step by step procedure :
    http://fuller.mit.edu/workflow/debugging.pdf
    www.erpgenie.com/sap/workflow/debugging.htm
    http://www.erpgenie.com/workflow/debugging.htm?2b5de440
    Workflow tutorials with step-by-step and with screenshots are available at
    http://www.****************/Tutorials/Workflow/Workflow.htm
    http://www.sapgenie.com/workflow/
    http://www.sap-img.com/workflow/sap-workflow.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    http://web.mit.edu/sapr3/dev/newdevstand.html
    http://www.sap-basis-abap.com/wf/sap-business-workflow.htm
    https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2857887
    https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2855919
    https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2735228
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/WORKFLOW_tutorial.html
    Reward points for useful Answers
    Regards
    Anji

  • My iphone 6 turned off while i was using face time and it returns with the screen saying Hello mean its reset automatically how is this possible ? Now it requires an id and password to activate which i do not remember need help ?

    My iphone 6 turned off while i was using face time and it returns with the screen saying Hello mean its reset automatically how is this possible ? Now it requires an id and password to activate which i do not remember need help ? but i do remember the id and password which i was using on itunes and Apple store. please i almoost buy it in 890$ so it will be a big lost please help me.

    shahzadfromlahore wrote:
    Now it requires an id and password to activate which i do not remember need help ? but i do remember the id and password which i was using on itunes and Apple store. please i almoost buy it in 890$ so it will be a big lost please help me
    Who set up the phone? Who's Apple ID was used to activate it?

  • How do I run a new Ipod on an older 500mhz 32 bit computer?  New ipod requires v 10.6.3 or higher which also requires 64 bit or 1ghz speed.

    How do I run a new Ipod on an older 500mhz 32 bit computer?  New ipod requires v 10.6.3 or higher which also requires 64 bit or 1ghz speed.

    http://ww2.cs.fsu.edu/~rosentha/linux/2.6.26.5/docs/DocBook/libata/ch07.html#excatATAbusErr wrote:
    ATA bus error means that data corruption occurred during transmission over ATA bus (SATA or PATA). This type of errors can be indicated by
    ICRC or ABRT error as described in the section called “ATA/ATAPI device error (non-NCQ / non-CHECK CONDITION)”.
    Controller-specific error completion with error information indicating transmission error.
    On some controllers, command timeout. In this case, there may be a mechanism to determine that the timeout is due to transmission error.
    Unknown/random errors, timeouts and all sorts of weirdities.
    As described above, transmission errors can cause wide variety of symptoms ranging from device ICRC error to random device lockup, and, for many cases, there is no way to tell if an error condition is due to transmission error or not; therefore, it's necessary to employ some kind of heuristic when dealing with errors and timeouts. For example, encountering repetitive ABRT errors for known supported command is likely to indicate ATA bus error.
    Once it's determined that ATA bus errors have possibly occurred, lowering ATA bus transmission speed is one of actions which may alleviate the problem.
    I'd also add; make sure you have good backups when ATA errors are frequent

  • HT3406 how can i pass "could not active iphone" when I want to use an old iphone 4 as ipod?

    I have old iphone 4 like to use as ipod.  How can i pass "could not active iphone", I just want to use it as ipod.
    thnak you.
    Vivo

    Using an iPhone without a wireless service plan

  • HT1695 I have a iPad and am trying to use wifi.  I am using a hotspot that requires a 6 character password.  The iPad wants 8 characters.

    I have a iPad 2 and am trying to use wifi for the first time.  I am using a hotspot that requires a 6 character password.   The iPad wants 8 characters.

    First make sure you are connecting to the right network. The next thing to do would be to change the password for the WiFi network to 8 characters.

  • I'm using numbers for my students grades. the passing grade is 30 points. what i want to happen is that very students with a grade of less than 30 will have their points it red color. does the IF function can do this? how?

    i'm using numbers for my students grades. the passing grade is 30 points. what i want to happen is that very students with a grade of less than 30 will have their points it red color. does the IF function can do this? how?

    Hi efren
    Conditional format will do this.
    Select the Cells, then Menu > Format > Show Conditional Format Rules
    Regards,
    Ian.

  • How to run Outlook Rule that fires a batch script that requires passing parameters.

    How do I pass arguments/parameters to a batch script in an Outlook rule ?  The Parameters would be located in the body of the message.
    Thanks.

    Hi,
    If the two arguments are always next to each other, then we can simply add that single phrase to the “specific words” list.
    If the two arguments are not always next to each other, then there is no way in Outlook to do this with a single rule but we can achieve this by creating 2 rules. See:
    http://www.msoutlook.info/question/220
    Please Note: Since the web site is not hosted by
    Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • HT4623 Help - new iOS requires pass code to access iPhone, never had one

    Updated my iPhone 5 with iOS 7 yesterday, never had used a 4 digit pass code to access the phone.  Now, cannot open the phone to use as I don't have any pass code. What should I do to fix this?  Synch to computer and lose data?  Go back to using a land line?
    Thanks in advance for your help

    There's no default password.
    Connect your iPad to iTune (computer) and do a restore.
    http://support.apple.com/kb/ht1414

  • I cant remember my pass code to my iPod and I wanted how to unlock it

    I been trying for about 3 days to unlock my iPod so I was wodering if their was a way for me to unlock or reset it without my pass code

    Forgotten Screen-Lock Passcode
    Connect the iOS device to your computer and try to make a backup
    iOS: How to back up
    Then restore via iTunes. The iOS device will be erased. Place the iOS device in Recovery Mode if necessary to allow the restore.
    If recovery mode does not work try DFU mode.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store   
    If problem what happens or does not happen and when in the instructions? When you successfully get the iPod in recovery mode and connect to computer iTunes should say it found an iPod in recovery mode.

  • Pass URL parameters to parent window, which is not in VC

    Hi,
    I developed a web application which is calling a VC iView in a new browser window, now I have the problem that I have to pass back URL parameters to the parent window. Is there any possibility to use JavaScript or is there some other solution?
    Thanks fpr your help.
    Kind regards,
    Timo

    Hi Mario,
    thanks a lot for your answer. If I understand correctly your solution works only if the other web application in the parent window is also located in the portal, unfortunately my web application is outside the portal.
    Is there a solution for this, or should I look for something else than using Visual Composer?
    Kind regards,
    Timo

  • Passing parameters into ODI procedure step which has an OS command

    Folks,
    I have an ODI procedure step which does a directory listing for a specific directory. The command I am using is
    cmd /C dir d:\local_dir /b > D:\dir_list.txt
    I have put on the 'Command on Target' tab. This works fine
    I want to remove the hardcoding for the directory references. I have tried the command
    cmd /C dir '#src_dir' /b > D:\dir_list.txt
    but when this executes it generates an ODI error 'Wrong process return code'
    any suggestions?

    I've figured it out. The issue was with using quotes in the value being passed into the variable. Once removed, it worked fine. Thanks for the assistance.
    Regards.
    Edited by: user810644 on 17-May-2010 01:59

  • I'd like to manually add a username/password entry to a bookmarked page that requires one but Firefox never asked if I wanted one. How do I do that? Thank you!

    For some places that I visit on the Web, usernames and passwords are required. For some of those, Firefox has asked if I wanted that info remembered, and for some of them it did not ask. For those, I have to manually enter my username and password information manually every time. This is a pain. Is there a way to manually add username/password info for a site into the password manager? I know I can delete one that is already there, but I want to add a new one. Failing that, is there a way to force Firefox to ask the question about remembering? Thank you very much!

    The Saved Password Editor extension has a feature that allows you to manually add a username & password for domains that block Firefox from offering to save the username & password. <br />
    https://addons.mozilla.org/en-US/firefox/addon/60265

  • Is the "Airport Utility" required to run in the background if I want to access the Time Capsule's HD?

    Hey there,
    I recently purchased a Time Capsule and want to use it for Backups and as an external HD to store files. The setup was easy and it's working so far. Except for one thing:
    Whenever I close the "Aiport Utility" on my Mac, I won't be able to connect to my Time Capsule's HD via Finder anymore. As soon as I start "Aiport Utility" again, everything is back to normal and I can access the HD.
    So my question is pretty simple: Do I have to constantly run the "Airport Utility", to gain access to the HD of the Time Capsule?
    If so, I think that's inconvenient.
    Thanks for your help

    I'm running Yosemite. I already did some research about this topic and I'm obviously not alone with this problem.
    I also stumbled upon this thread of yours: Airport Utility cannot find Time Capsule ("device not found")
    I tried some of the things, but unfortunately so far without any success. Guess we'll just have to wait for the upcoming OSX update.

  • I didn't create a pass code for my iPod touch, I want to change it but I don't know what is the original pass code?

    I never created a password for my iPod touch, it wants me to enter the original one to change it? I never entered one in the first place...default?

    Connect the iOS device to your computer and restore via iTunes. Place the iPod in Recovery Mode if necessary to allow the restore.
    For how to restore:
    iTunes: Backing up, updating, and restoring iOS software

Maybe you are looking for