#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    2
    Rep Power
    0

    Find complexity of the given code?


    try{
    ReadExcel test = new ReadExcel();
    test.setInputFile("C:/Users/PRIYA/Documents/NetBeansProjects/JavaApplication2/src/dbscan/Input.xls");

    corrdinatMap= (HashMap)test.read();
    System.out.println(">>>1");

    if(corrdinatMap.containsKey("xCordinat"))
    xAxis=(ArrayList)corrdinatMap.get("xCordinat");
    if(corrdinatMap.containsKey("yCordinat"))
    yAxis=(ArrayList)corrdinatMap.get("yCordinat");

    System.out.println(">>>2");

    xX = (Object[]) xAxis.toArray();
    yY = (Object[]) yAxis.toArray();

    System.out.println(">>>3");

    if(xX.length > yY.length)
    loopCount=xX.length;
    else
    loopCount=yY.length;


    Class.forName("oracle.jdbc.driver.OracleDriver");
    user="system";
    password="priya";
    URL="jdbcracle:thin:@localhost:1521:XE";
    }
    catch(Exception e){System.out.println("Exception>>1>>>"+e);}

    for(int loop=0;loop< loopCount;loop++)
    {
    try{
    tfx.setText(xX[loop].toString());
    tfy.setText(yY[loop].toString());

    x1 = Integer.parseInt(tfx.getText());
    y1 = Integer.parseInt(tfy.getText());
    System.out.println("aadPoints1>>>>"+x1+", "+y1);
  2. #2
  3. Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    May 2004
    Location
    Superior, CO, USA
    Posts
    2,418
    Rep Power
    1713
    Creating two different threads where you don't even ask a question, not to mention posting code that can't compile will not get you an answer.

    What is the problem you're trying to solve?
  4. #3
  5. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,711
    Rep Power
    347

IMN logo majestic logo threadwatch logo seochat tools logo