How to move one array into another...

Move the values in temp[] into scores[][].
int temp[]= {34 ,24,78,65,45,100,90,97,56,89,78,98,74,90,98,24,45,76,89,54,12,20,22,55,66};int scores = new int[5][5];
Thanks
c

well last try... :)
some chars just dont display... when I use [ _pre_ ]
tagg
public static void main(String[] args)
int temp[]= {34
{34
,24,78,65,45,100,90,97,56,89,78,98,74,90,98,24,45,76,89
54,12,20,22,55,66};
int[][] scores = new int[5][5];
int k = 0;
for( int a=0; a<scores.length; a++ )
for( int b=0; b<scores[a].length; b++ )
scores[ a ][ b ] = temp[ k++ ];
for( int a = 0; a<scores.length; a++ )
for( int b = 0; b<scores[ a ].length; b++ )
System.out.print( scores[ a ][ b ] + " ");
In case you're wondering, this is my reply from the Advanced Topics forum decoded into a "New to Java" forum answer. ;) Also an illustration of a bug in the code brackets.

Similar Messages

  • How to move a selection into another selection in elements 12

    how to move a selection into another selection in elements 12

    Open picture B, the one you wish to select something from to add to another picture.
    Use one of the selection tools, e.g. selection brush, lasso tool, to select the object. You will see an outline ("marching ants") once the selection is complete
    Go to Edit menu>copy to copy the selection to the clipboard
    Open picture A, then go to Edit>paste
    Use the move tool to position object from picture B.
    In the layers palette you should see picture A as the background layer, and object B on a separate layer

  • How to include one view into another view

    Hi SDN's,
                   Could any please tell me,How to include one view into another view.
    In my requirment.I want to create a 'Z' view for an interface .In that  view i have to take,
    1) Ship-to-email adrr by
                              LIKP-KUNNR -> KNA1-ADRNR
                              KNA1-ADRNR -> ADR6-ADDRESNUMBER.
    2) E-mail addr of person who created the document.i.e
        LIKP-ERNAM -> USR21-BNAME.
        USR21-ADDRESNUMBER ->  ADR6-ADDRESNUMBER 
        USR21-PERSNUMBER -> ADR6-PERSNUMBER.
       In both the case we have to pass ADDRESSNUMBER to ADR6 table.
    If we pass these condition it fails,B'Coz at a time it passes Two ADDRESSNUMBER and a PERSNUMBER.
    So i created two which fetches only the email addr of  person who created the document.and another view fetches Ship-to-email addr.
    Now i want to include the second view into first view . Is it possible?or please
    tell me someother way to get these email addresses in a single view.

    hi
    as per my knowledge, nested views are not possible. However, while creating a new view, selection method will not giv u option to select the already created view(S) except the tables..i think so.
    regards,
    shamim

  • Insert columns of one array into another

    how can one insert columns of an array into another array at every odd place of that array in which insertions are to be made? In short, columns of one array to be inserted into another array bt possibly in between the already initialised array. 
    Solved!
    Go to Solution.

    here's an example, feel free to ask question if it's not clear for you.
    hope it helps
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    insert.vi ‏20 KB

  • How to call one  JSFF into another JSFF

    Hi,
    I am very new to ADf. Could you please tell me how to call one JSFF inside another JSFF. We have a common pop-up written in one JSFF. Is there any best approach to get this pop-up into other JSFF.
    Thanks in Advance.
    Regards
    Narasimha

    If you want to resue the jsff code, make use of bounded task flow with page fragment and then use it as a region.
    For more details you can refer: http://docs.oracle.com/cd/E21764_01/web.1111/b31974/taskflows_regions.htm
    One more:
    http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_57/jdtut_11r2_57.html

  • How to copy one schema into another

    I need to copy one schema into another. That means, all the tables, views, constraints, etc, and all the data as well.
    I have a dmp file of source-schema (created daily with expdp by our backup schedule).
    Can I use impdp to import this dmp file into dest-schema? I'm thinking about something like this:
    The dmp file was created with:
    expdp source-schema/pwd DIRECTORY=dmpdir DUMPFILE=myproject.dmp
    Create the copy on dest-schema with:
    impdp dest-schema/pwd DIRECTORY=dmpdir DUMPFILE=myproject.dmp
    (dest-schema is an existing schema on the same machine. I'll drop all the tables before executing the command. Is there anything else I should do first?)
    If this approach is not feasible, kindly suggest me an alternative.
    Thank you.
    Edited by: mgro on Apr 16, 2010 3:22 AM (changed 2nd command: expdp to impdp)

    Thank you both. Dean, I've made a note of your proposed command. May use it next time.
    In the end I used the following command and it worked for me. I added TABLE_EXISTS_ACTION=REPLACE since the destination was not empty.
    First I ran these command logged in as SYS
    GRANT Import Full Database TO dest-schema;
    GRANT Create Any Directory TO dest-schema;
    GRANT Unlimited Tablespace TO dest-schema;
    impdp
    dest-schema/pwd
    DIRECTORY=dmpdir
    DUMPFILE=myproject.dmp
    REMAP_SCHEMA=source-schema:dest-schema
    TABLE_EXISTS_ACTION=REPLACE
    LOGFILE=implog.log
    There were some errors though. The import process complained about constraints referencing non-existent primary keys.
    It turns out that the source schema has some constraints that are marked with status DISABLED. These constraints either:
    - are not part of the DUMP file
    or
    - are in the DUMP file but skipped during import
    Don't know if this is a bug or by design behavior.

  • How to merge one library into another library?

    In iPhoto  9.6, is it possible to merge one library into another library? Or otherwise, import individual pictures, from one library into the other library? All of this happening on the same computer.I understand that this feature was covered by Aperture but that this is no longer supported under Yasemite?

    No
    The current version of Aperture can merge libraries (I have no idea where you got the incorrect information that it can not)
    The paid version of iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ -  can
    Those are you only two choices
    LN

  • How to move one screen to another screen Webdynpro ?

    Hi,
    How to move from one screen to another screen Webdypro ?
    Best Regards,
    Kishore

    Hi,
    for this you have to declare in and outbound plugs to your views,
    bind them into the window area of your component and fire the
    outbound plug in your action handler in view one, view2 will be called
    automatically.
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/1f/464941db42f423e10000000a155106/frameset.htm">documentation</a>
    grtz
    Koen

  • How to add one DC into Another

    Hi
         I have created one DC ,now I want to use this DC into another.
         My application is like:
         I have one i/p field and beside it one button which calls another DC.So how     to   do this?
    Thanks
    Prajakta

    Hi,
    This link will solve your problem.
    WebDynpro DC -create and use
    Correct steps to use Java class in WD Java DC from another WD Java DC
    For any queries feel free to ask.
    Regards,
    Praveen

  • How to insert one document into another in microsoft word?

    I would like to set up a word document such that the document has embedded in it another document shrunk down a bit to make room for additional comments and information which I will add on the side. I've been looking to see if word 2007 has this feature
    but have had difficulty finding it. Is it possible to take an entire document and insert it as a resizeable object into another?
    Some of my research suggests that I might be able to accomplish something of this nature with publisher, and while several people in my office do not have publisher and we'd prefer if it were doable in word, instructions for publisher would be appreciated
    as well if Word 2007 cannot do this.

    Hi,
    Thank you for using 
    Word IT Pro Discussions
    forum. 
    From your description, I understand that 
    you would like to know to how to add a Word document into another Word document in Word 2007, and you can make some comments besides the embedded Word documents.
    If there is any misunderstanding, please feel free to let me know.
     Thank you for your inquiring.
    To insert a Word document to another Word document in Word 2007, follow the steps below:
    =========
    1.      
    In the Word document, click the
    Insert tab.
    2.      
    Click the
    Object in the Text group.
    3.      
    Click
    object. Then click the Create from file tab.
    4.      
    Click the
    Browse button to select the Word document. Also, check the checkboxes before:
    Link to file and Display as icon.
    5.      
    Click
    OK to save the settings.
    Please take your time to try the suggestions and let me know the results at your earliest convenience. If anything is unclear or if there is anything I can do for
    you, please feel free to let me know.
    Best Regards,
    Sally Tang

  • How to move ONE account to another Mac

    Greetings!
    My wife and I have separate email accounts, running Mail, on my PowerBook. I need to go away for some weeks. What is the best way of moving her account/mailboxes/mail history to the kids' Mac while I am away? And then, of course, move it all back again?

    Not so easy, if you have separate email accounts, btu lumped them into one instance of mail.
    Do you use IMAP - e.g.: .mac or another IMAP account? If so, just set up the account on another computer and it will automatically synchronize. That's why I recomend people pay for 3rd party IMAP, rather than POP email accounts.
    If not, then you could simply set up the account on the other machine and use it. Your history and address book would nto be present, but it would work ok. You could then copy all the emails sent and received while you are gone back to the original.
    Moving (copy-ing) the entire Library/Mail folder, unfortunately, would move all of YOUR email too, and over-write the settings on the other machine. So I would not do that unless its essentially an unused machine.
    Maybe someone else has a better idea.
    If this happens a lot, consider buying an IMAP account. Several good companies sell them for $20/yr.
    Grant

  • In expert mode, using the mover tool, I can not move one picture into another. Need help as I get error message

    I have two pictures in expert mode in editor. I go to "Move tool", click on picture but I am unable to move and drop in second picture. I do not get the dashed lines around the picture, and if I move cursor to
    move picture, I get the following message " This operation cannot be performed on the locked background layer. Do you want to convert the locked background layer into an editable layer?"  I have no idea
    what I need to check or uncheck to make it work.,  I am following a lesson plan in a "Infinite Skills" training course.  I talked to them, but was unable to come up with a answer.  Help, please I have been
    trying to do this move for over a week.  tks  rdf

    We don't know whether this tutorial was written for Photoshop or Photoshop Elements, more specifically for which version of PSE. There are differences. Be sure to have the layers palette open.
    Try this instead
    Open picture B, the one you wish to select something from to add to another picture.
    Use one of the selection tools, e.g. selection brush, lasso tool, to select the object. You will see an outline ("marching ants") once the selection is complete
    Go to Edit menu>copy to copy the selection to the clipboard
    Open picture A, then go to Edit>paste
    Use the move tool to position object from picture B.
    In the layers palette you should see picture A as the background layer, and object B on a separate layer.
    To unlock the background layer, double click on it in the layers palette. Perhaps your tutorial will  guide you through the process.

  • How to Include one iView into another iView

    Hi All,
    My requirement is to have 3 input fields across many iviews. on entering the values in those fields, i will invoke a Web Service Model.
    I dont want to keep these 3 fields in all iviews, rather i am planning to create one iview with 3 fields integrated with model and call this iview in many other iviews.
    How do i achieve this in wed dynpro coding. In JSP, there is a concept called "Include Jsp Page" . Is there any similar kind of functionality in WD.
    Kindly guide me .
    Reg/Venkat

    Hi,
    In the portal, create a page and place the iView having the three input fields on top. Place the second iView below. Keep differing the second iView for every page. In this way you can make the iView with 3 input fields only in the desired pages. You can use EPCF to invoke / navigate to another iView.
    Regards
    Srinivasan T

  • How to move one library to another

    So i got a new computer and have been trying to put my ipod onto the new computer but when i downloaded itunes and i go to transfer all my music it will only replace the empty library with the old one and wont replace the new librbary with all my previous music....does anyone know how to do that?

    Lydia
    By chance,do you have any relatives named Abbott and Costello?

  • How to morph one photo into another?

    Hi
    Does anyone know how to do a simple photo morph in Flash CS4?  I have image 1 on keyframe 1, and image 2 on keyframe 25, but aren't sure what kind of tween is required or what to do with the tween.
    Thanks
    Shaun

    You probably won't get what you expect (image morphing is not 'simple'), but...  What you need to do is select each image on the stage and choose Modify -> Bitmap -> Trace Bitmap.  The smaller you set the value in the panel that appears, to higher the image quality when it's done.  Then you select the first and choose Insert -> Create Shape Tween.

Maybe you are looking for

  • IMixes no longer showing up in iTunes

    Has anyone else noticed that iMixes are no longer on the Artist pages? Usually when you click on an Artist, the top iMixes are listed at the bottom right. Also when I post an iMix, I get a message stating "We could not complete your Itunes Store requ

  • How to get different sum value by different types of record in sql server

    Hi,I have my query result like below AppID       LabType      DiaType      LabPrice    DiaPrice   1                 a                b               100          1000   1                 a                cc              100          1000   1         

  • Creating Protection Group Fails with Error:360 The operation failed due to a virtual disk service error

    Hello I'm setting up a DPM server (2012 R2) at a remote site; everything goes well with no issues until a protection group is created, at which point I get the following error; Create protection group: Protection Group 1 failed: Error 360: The operat

  • Project Professional 2010 download

    Help!! I need a download link for Project Professional 2010 I have a license for 2010 and I still have the cd. I want to install it on my new sleekbook - which has no cd drive  (I was referred to you by @ project on twitter)

  • How can I look at old text messages

    How can I look at old text messages that I haven't deleted my phone just won't load to let me go up that far.?