Which JDK doc to read up for more info on array ?

The title says it all. I need to know what other properties does an array has. For instance, we can use "x_array.length" to find out no.of elements in x_array. Is there a property to tell how many dimension does the array has ? The ".length" only gives size of one dimension. To find the size of another dimension, I need to do something as below :-
int two_D_array[][] = new int[20][30];
out.printf("1) two_D_array size %d\n", two_D_array.length);
out.printf("2) two_D_array size %d\n", two_D_array[0].length);
Output :
1) two_D_array size 20
2) two_D_array size 30
Is there any better way to improve the above codes ? Thank you.

TKH wrote:
The title says it all. I need to know what other properties does an array has. That's easy. There are none ;)
Is there a property to tell how many dimension does the array has ? The ".length" only gives size of one dimension. To find the size of another dimension, I need to do something as below :-
Nope, you can't know. Or rather you have to know when declaring the array so there's no way to change it on the fly.
As a result there's no need to know...
Something like
int[] arr = getIntArr();
private int[] getIntArr() {
    return new int[1][2][3][4][5] {};
}won't even compile.

Similar Messages

  • How to make a switch loop? ( Read inside for more info.)

    I'm working on a project using switch and I want to know how to make it loop/ or is it possible to do so with for or while. If anyone could help me I'd be very thankfull.
    Since my switch is too long I'll make an example:
    System.out.println();
    System.out.println();
    System.out.println("Zgjedhni operacionin: ");
    System.out.println("1. Mbledhja A + B\n");
    System.out.println("2. Zbritja A - B\n");
    optionNumber = sc.nextInt();
    switch ( optionNumber ) {               
                        case 1: System.out.println("\nMbledhja A + B: ");
                              s11 = (a11+b11);
                              s12 = (a12+b12);
                              s13 = (a13+b13);
                              s21 = (a21+b21);
                              s22 = (a22+b22);
                              s23 = (a23+b23);
                              s31 = (a31+b31);
                              s32 = (a32+b32);
                              s33 = (a33+b33);
                              System.out.println( s11 + " - " + s12 + " - " + s13 );
                              System.out.println( s21 + " - " + s22 + " - " + s23 );
                              System.out.println( s31 + " - " + s32 + " - " + s33 );
                              break;
                        case 2: System.out.println("\nZbritja A - B: ");
                              s11 = (a11-b11);
                              s12 = (a12-b12);
                              s13 = (a13-b13);
                              s21 = (a21-b21);
                              s22 = (a22-b22);
                              s23 = (a23-b23);
                              s31 = (a31-b31);
                              s32 = (a32-b32);
                              s33 = (a33-b33);
                              System.out.println( s11 + " - " + s12 + " - " + s13 );
                              System.out.println( s21 + " - " + s22 + " - " + s23 );
                              System.out.println( s31 + " - " + s32 + " - " + s33 );
                              break;I've got the variables declared of course :P so now what I want after doing case 1 or case 2 or any other cases ( 9 in my program) I want to make a question if I want to do another operation and start again from beginning :$/

    Solved it.
    do {
    System.out.println();
    System.out.println();
    System.out.println("Zgjedhni operacionin: ");
    System.out.println("1. Mbledhja A + B\n");
    System.out.println("2. Zbritja A - B\n");
    optionNumber = sc.nextInt();
    switch ( optionNumber ) {               
                        case 1: System.out.println("\nMbledhja A + B: ");
                              s11 = (a11+b11);
                              s12 = (a12+b12);
                              s13 = (a13+b13);
                              s21 = (a21+b21);
                              s22 = (a22+b22);
                              s23 = (a23+b23);
                              s31 = (a31+b31);
                              s32 = (a32+b32);
                              s33 = (a33+b33);
                              System.out.println( s11 + " - " + s12 + " - " + s13 );
                              System.out.println( s21 + " - " + s22 + " - " + s23 );
                              System.out.println( s31 + " - " + s32 + " - " + s33 );
                              break;
                        case 2: System.out.println("\nZbritja A - B: ");
                              s11 = (a11-b11);
                              s12 = (a12-b12);
                              s13 = (a13-b13);
                              s21 = (a21-b21);
                              s22 = (a22-b22);
                              s23 = (a23-b23);
                              s31 = (a31-b31);
                              s32 = (a32-b32);
                              s33 = (a33-b33);
                              System.out.println( s11 + " - " + s12 + " - " + s13 );
                              System.out.println( s21 + " - " + s22 + " - " + s23 );
                              System.out.println( s31 + " - " + s32 + " - " + s33 );
                              break;
    System.out.println("Doni te beni edhe nje operacion?: ");
    vazhdo = sc.next().equalsIgnoreCase("PO");
    while ( vazhdo == true);Sorry for double posting can't see an edit button :$

  • Someone got into my Apple account. Read description for more info.

    Recently, someone gained access to my Hotmail account (I don't know how, I'm a pretty careful person, especially around computers) and used it to reset my Apple account password. I always just changed it back (thank God he/she was too stupid to change my Hotmail password), but when I realized they got access through my Hotmail, I reset all my passwords associated with the account. This worked and I haven't had any trouble since I did so. However, he/she continuously tries to reset my Apple password and my account gets flooded with Apple ID reset requests all the time. Is there any way to make it stop? It's getting really annoying.
    Thanks,
    Chris

    Call AppleCare & ask for account security. Also, look at this:
    http://support.apple.com/kb/HT5570

  • WHICH JDK java hotspot I  need for weblogic 10.3.6  SOA 11.1.1.7 and OSB 11.1.1.7

    I used jrockit but somebody told me that It will be good to move to JDK 1.7.0.28 because jrockit will gone in future.
    WHICH JDK java hotspot I  need for weblogic 10.3.6  SOA 11.1.1.7 and OSB 11.1.1.7?
    and where can I download it?
    Thank you

    Hi,
    For WL 10.3.6, SOA/OSB 11.1.1.7 the Enterprise Deployment Guide has still jrockit sdk 1.6 as recommendation...
    http://docs.oracle.com/cd/E28280_01/core.1111/e12036/create_domain.htm#CCHBFCDC
    The roadmap is to converge jrockit and hotspot JVMs, completion of the convergence project is targeted for JDK 8.
    http://www.oracle.com/us/corporate/press/1854982
    Things are already changed for 12c, but for 11g I'd still go with jrockit...
    Cheers,
    Vlad

  • Just did the iTunes update that iTunes said was available now iTunes won't open, keep getting Runtime Error message.  R6034 An application has made an attempt to load the C runtime library incorrectly.  Please contact the apps support team for more info.

    Just did the iTunes update that iTunes said was available, now iTunes won't open.  I just keep getting a Runtime Error message. 
    R6034
    An application has made an attempt to load the C runtime library incorrectly.  Please contact the apps support team for more info.
    Is anyone else having this problem?
    I tried to re-install and got the following message:  iTunes was not installed correctly.  Please reinstall iTunes.  Error 7 (Windows error 1114)
    Does this mean I have now lost everything?

    I just had the same error: 
    R6034
    An application has made an attempt to load the C runtime library incorrectly.  Please contact the apps support team for more info.
    I went to http://support.apple.com/kb/ht1925 and did a complete removal and reinstallation of iTunes. You MUST follow the directions here exactly...it's more than just iTunes that must be removed, and it MUST be done in the order in which the support article says.  I followed the exact instructions, and iTunes is back on my machine (no more C runtime error) and you do NOT lose your music...it's all in my library, as it was before.
    Good luck!

  • Items could not be synced. See iTunes for more info.

    Sync of new iPad mini, popup on mini says 53 items could not be synced, see iTunes for more info. OK.
    Where in iTunes is more info? Which 53 items? I can find no clue. Also iBooks blows up on 2 of my books that open fine on my old iPad 1, maybe they didn't sync?

    I see now after the Sync, a  !triangle appears next to my mini in iTunes. Clicking on it brings up a list. Sure would be nice to be able to Save that list, since I can't fix anything while that list is showing! And once you close it, the warnings disappear along with the triangle. I ended up using Grab to save the info.
    Reset Warnings also makes the triangle go away. Along with all that info.

  • ORA-00205: error in identifying controlfile, check alert log for more info

    Hello All,
    I am performing my first Collab Suite install in quite some time and I have successfully installed Collaboration Suite on Linux Red Hat AS 4. I first performed an infrastructure installation for the Collab Suite database which completed with no errors, however, it appears that no control files were created in my $ORACLE_HOME/dbs directory during installation. I am also unable to specify their exact location in the initSID.ora file as I am unable to find them in any other directory on my server. The database starts despite the control file error, as you can see from the second SQL*Plus prompt. However, I am unsure how to create the control files or correct this error. Any assistance would be greatly appreciated!
    SQL*Plus: Release 10.1.0.4.2 - Production on Wed Mar 21 09:51:49 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL> connect SYS as SYSDBA
    Enter password:
    Connected to an idle instance.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 100663296 bytes
    Fixed Size 778024 bytes
    Variable Size 99623128 bytes
    Database Buffers 0 bytes
    Redo Buffers 262144 bytes
    ORA-00205: error in identifying controlfile, check alert log for more info
    ======================================================================
    SQL*Plus: Release 10.1.0.4.2 - Production on Wed Mar 21 11:18:57 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL> connect SYS as SYSDBA
    Enter password:
    Connected.
    SQL> startup nomount
    ORA-01081: cannot start already-running ORACLE - shut it down first
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.4.2 - Production
    With the Partitioning, OLAP and Data Mining options

    Control files are database-specific, since they contain information describing the database (location of data files, etc.) You can't copy them from one database to another.
    Do you have a backup?

  • Error in identifying control file, check alert log for more info

    hi ,
    i have a problem when i try to login to oracle
    i found this messsage
    error
    ora-01033 oracle initialization or shutdown in progressafter i logged on with / as sysdba
    i did the following
    SQL> shutdown immediate;
    ORA-01507: database not mounted
    ORACLE instance shut down.
    SQL> startup mount;
    ORACLE instance started.
    Total System Global Area 293601280 bytes
    Fixed Size 1248600 bytes
    Variable Size 79692456 bytes
    Database Buffers 205520896 bytes
    Redo Buffers 7139328 bytes
    ORA-00205: error in identifying control file, check alert log for more info----------------------------------------------------------------
    O.S = Windows 7 Profissional
    Oracal release= 10 g release 10.2.0.1.0
    the last lines of the alert log file is
    Starting up ORACLE RDBMS Version: 10.2.0.1.0.
    System parameters with non-default values:
    processes = 150
    __shared_pool_size = 71303168
    __large_pool_size = 4194304
    __java_pool_size = 4194304
    __streams_pool_size = 0
    sga_target = 293601280
    control_files = E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL, E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL02.CTL, >E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL03.CTL
    db_block_size = 8192
    __db_cache_size = 205520896
    compatible = 10.2.0.1.0
    db_file_multiblock_read_count= 16
    db_recovery_file_dest = e:\oracle\product\10.2.0\db_1/flash_recovery_area
    db_recovery_file_dest_size= 2147483648
    undo_management = AUTO
    undo_tablespace = UNDOTBS1
    remote_login_passwordfile= EXCLUSIVE
    db_domain =
    dispatchers = (PROTOCOL=TCP) (SERVICE=orclXDB)
    job_queue_processes = 10
    audit_file_dest = E:\ORACLE\PRODUCT\10.2.0\DB_1\ADMIN\ORCL\ADUMP
    background_dump_dest = E:\ORACLE\PRODUCT\10.2.0\DB_1\ADMIN\ORCL\BDUMP
    user_dump_dest = E:\ORACLE\PRODUCT\10.2.0\DB_1\ADMIN\ORCL\UDUMP
    core_dump_dest = E:\ORACLE\PRODUCT\10.2.0\DB_1\ADMIN\ORCL\CDUMP
    db_name = orcl
    open_cursors = 15000
    pga_aggregate_target = 96468992
    PMON started with pid=2, OS id=1560
    PSP0 started with pid=3, OS id=208
    MMAN started with pid=4, OS id=972
    DBW0 started with pid=5, OS id=4092
    LGWR started with pid=6, OS id=3812
    CKPT started with pid=7, OS id=344
    SMON started with pid=8, OS id=3492
    RECO started with pid=9, OS id=2272
    CJQ0 started with pid=10, OS id=3276
    MMON started with pid=11, OS id=1832
    MMNL started with pid=12, OS id=1636
    Wed Nov 21 11:44:31 2012
    starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
    starting up 1 shared server(s) ...
    Wed Nov 21 11:44:32 2012
    ALTER DATABASE MOUNT
    Wed Nov 21 11:44:32 2012
    ORA-00202: control file: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) can not find the specified file
    Wed Nov 21 11:44:32 2012
    ORA-205 signalled during: ALTER DATABASE MOUNT...Please anyone has any info please share me
    thank you ,
    regards,
    Edited by: ayadsufyan on 21-Nov-2012 01:04
    Edited by: ayadsufyan on 21-Nov-2012 01:30

    ayadsufyan wrote:
    hi ,
    i have a problem when i try to login to oracle
    i found this messsage
    error
    ora-01033 oracle initialization or shutdown in progressafter i logged on with / as sysdba
    i did the following
    SQL> shutdown immediate;
    ORA-01507: database not mounted
    ORACLE instance shut down.
    SQL> startup mount;
    ORACLE instance started.
    Total System Global Area 293601280 bytes
    Fixed Size 1248600 bytes
    Variable Size 79692456 bytes
    Database Buffers 205520896 bytes
    Redo Buffers 7139328 bytes
    ORA-00205: error in identifying control file, check alert log for more info----------------------------------------------------------------
    O.S = Windows 7 Profissional
    Oracal release= 10 g release 10.2.0.1.0
    the last lines of the alert log file is
    Starting up ORACLE RDBMS Version: 10.2.0.1.0.
    System parameters with non-default values:
    processes = 150
    __shared_pool_size = 71303168
    __large_pool_size = 4194304
    __java_pool_size = 4194304
    __streams_pool_size = 0
    sga_target = 293601280
    control_files = E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL, E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL02.CTL, >E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL03.CTL
    db_block_size = 8192
    __db_cache_size = 205520896
    compatible = 10.2.0.1.0
    db_file_multiblock_read_count= 16
    db_recovery_file_dest = e:\oracle\product\10.2.0\db_1/flash_recovery_area
    db_recovery_file_dest_size= 2147483648
    undo_management = AUTO
    undo_tablespace = UNDOTBS1
    remote_login_passwordfile= EXCLUSIVE
    db_domain =
    dispatchers = (PROTOCOL=TCP) (SERVICE=orclXDB)
    job_queue_processes = 10
    audit_file_dest = E:\ORACLE\PRODUCT\10.2.0\DB_1\ADMIN\ORCL\ADUMP
    background_dump_dest = E:\ORACLE\PRODUCT\10.2.0\DB_1\ADMIN\ORCL\BDUMP
    user_dump_dest = E:\ORACLE\PRODUCT\10.2.0\DB_1\ADMIN\ORCL\UDUMP
    core_dump_dest = E:\ORACLE\PRODUCT\10.2.0\DB_1\ADMIN\ORCL\CDUMP
    db_name = orcl
    open_cursors = 15000
    pga_aggregate_target = 96468992
    PMON started with pid=2, OS id=1560
    PSP0 started with pid=3, OS id=208
    MMAN started with pid=4, OS id=972
    DBW0 started with pid=5, OS id=4092
    LGWR started with pid=6, OS id=3812
    CKPT started with pid=7, OS id=344
    SMON started with pid=8, OS id=3492
    RECO started with pid=9, OS id=2272
    CJQ0 started with pid=10, OS id=3276
    MMON started with pid=11, OS id=1832
    MMNL started with pid=12, OS id=1636
    Wed Nov 21 11:44:31 2012
    starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
    starting up 1 shared server(s) ...
    Wed Nov 21 11:44:32 2012
    ALTER DATABASE MOUNT
    Wed Nov 21 11:44:32 2012
    ORA-00202: control file: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) can not find the specified file
    Wed Nov 21 11:44:32 2012
    ORA-205 signalled during: ALTER DATABASE MOUNT...Please anyone has any info please share me
    thank you ,
    regards,
    Edited by: ayadsufyan on 21-Nov-2012 01:04
    Edited by: ayadsufyan on 21-Nov-2012 01:30I'd say the error message is pretty self-evident:
    ORA-00202: control file: 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) can not find the specified fileWhat do you suppose "can not find the specified file" means?
    And what does this have to do with database security?

  • TS3074 While trying to download Itunes on my lenovo laptop it tells me in an error box the following : " this installation package could not be opened verify that it exsist or contact the vendor for more info" what did i do?

    While trying to download Itunes on my lenovo laptop it tells me in an error box the following : " this installation package could not be opened verify that it exsist or contact the vendor for more info" what did i do?

    Perhaps the answer provided for this problem in Microsoft's forums will help.
    Good luck.

  • HT1311 I have been using my apple TV successfully for 1 year.  Today there was a message telling me I cannot sign in because the terms and conditions have changed.  Please go to apple support for more info.  However, I cannot find any info.  What do I do

    I have been using my apple TV successfully for 1 year.  Today there was a message telling me I cannot sign in because the terms and conditions have changed.  Please go to apple support for more info.  However, I cannot find any info.  What do I do next.

    Wow, Karan Taneja, you've just embarrassed yourself on a worldwide support forum.  Not only is your post ridiculous and completely inappropriate for a technical support forum, but it also shows your ignorance as to whom you think the audience is.  Apple is not here.  It's users, like you. 
    If you would have spent half the time actually reading the Terms of Use of this forum that YOU agreed to by signing up to post, as you did composing that usesless, inappropriate post, you (and the rest of us on this forum) would have been much better off.

  • ORA-00205: error in identifying control file, check alert log for more info

    Hi
    I'm creating a database manually,
    I am hitting with the following error :
    SQL> startup mount
    ORACLE instance started.
    Total System Global Area 150667264 bytes
    Fixed Size 1335080 bytes
    Variable Size 92274904 bytes
    Database Buffers 50331648 bytes
    Redo Buffers 6725632 bytes
    ORA-00205: error in identifying control file, check alert log for more info
    Following is the entry in init.ora
    control_files='/u01/oracle/db/oradata/testdb/control01.ctl','/u01/oracle/db/oradata/testdb/control02.ctl'
    and this the owner priviliges of /u01/oracle/db/oradata/testdb directory
    drwxrwx--- 2 oracle dba 4096 Oct 10 12:16 testdb

    Found in $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace/alert/log.xml
    ORA-00210: cannot open the specified control fileORA-00202: control file: '/u01/oracle/db/oradata/testdb/control02.ctl'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    ORA-00210: cannot open the specified control file
    ORA-00202: control file: '/u01/oracle/db/oradata/testdb/control01.ctl'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3

  • "X items could not be synced. See Itunes for more info" but Itunes AOK

    I am having problems syncing my iPhone to itunes. Itunes runs through the syncing process and at the end my phone says "X Items could not be synced. See Itunes for more info".  When I look at Itunes I can't find any evidence that something went wrong.  Is there an error log or something I can look up to find out what is going wrong?
    thanks!

    Found another thread with a few possible solutions. The one that worked for me was to delete the ipod photo cache in the "Pictures" folder. Here's the thread: https://discussions.apple.com/thread/3390697

  • Which JDK/JRE is the best for 8i?

    After seeing so many people having problems with 8i I
    would like to ask what version of JDK/JRE works best??
    Thanks
    Lynx
    null

    Oh that! I forgot that there were problems with the 1.1.6 revs
    and glibc2.1! Thanks for the info.
    Have people been succesful with 1.1.7???
    Keehan
    Thorsten Heit (guest) wrote:
    : Keehan (guest) wrote:
    : : Just wondering peoples various experiences have been with
    : : different versions of the JDKs/JREs? Why would you say that
    : : 1.1.7 v 3 would be better other than the obvious fact that it
    : is
    : : a more current rev?? Thanks for your time and thoughts!
    : The problem is that earlier versions of the JDK/JRE don't work
    : on RH6 because RH6 uses the glibc-2.1 that isn't directly
    : compatible to the glibc-2.0 :-(
    null

  • New features for next CC update: open apps, contextual menus, option-click for more info...

    I'd like to see the CC app gain a few features that would enable a more efficient workflow right from the app:
    1. Ability to open apps from the menu bar. I know we can stuff 'em in our Docks and open them in Spotlight, but being able to interact with our apps would be great. Perhaps each app could have its own gear/triangle, or each icon could be interactive; this would open a contextual menu from which we can open, delete, update, get help, maybe open recent docs....
    2. Option-clicking an app icon could pop up more info (e.g., version, last used, etc)
    3. Allow us to sort apps either manually or by automatic criteria (recently used, most used, recently updated, etc)
    See attached PNG for concepts.Adobe Creative Cloud

    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform for bugs or feature requests is a better place to post

  • Please help! when i try to open itunes get this"an app has mad an atempt to load the c run time library incorectly please contact the app support team for more info"

    Hi everyone I was wondering if someone can help with this issue please. When i tried to open itunes in my laptop that is running on windows xp i get this error message " program c:/program files/itunes/itunes.exe
                     RC034
                     an application has made an attempt to run the c runtime time library incorrectly
                     please contact the aplication support team for more information."

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99199)

Maybe you are looking for