Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 9 of 9

Thread: complexity of code??

  1. #1
    Junior Member
    Join Date
    Oct 2012
    Posts
    22
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default complexity of 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="jdbc:oracle: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
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    18,725
    Thanks
    45
    Thanked 1,974 Times in 1,948 Posts

    Default Re: complexity of code??

    Please edit your post and wrap your code with code tags:
    [code=java]
    <YOUR CODE HERE>
    [/code]
    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Oct 2012
    Posts
    22
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default complexity of 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);

  4. #4
    Junior Member
    Join Date
    Oct 2012
    Posts
    22
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default complexity of 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="jdbc:oracle: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);

  5. #5
    Junior Member
    Join Date
    Oct 2012
    Posts
    22
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default find out the complexity of 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="jdbc:oracle: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);

  6. #6
    Junior Member
    Join Date
    Oct 2012
    Posts
    22
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default complexity of 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="jdbc:oracle: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);

  7. #7
    Junior Member
    Join Date
    Oct 2012
    Posts
    22
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default find out the complexity of 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="jdbc:oracle: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);

  8. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    18,725
    Thanks
    45
    Thanked 1,974 Times in 1,948 Posts

    Default Re: complexity of code??

    Please only post a question one time on the forum.

    Posts have been merged

    --- Update ---

    One post is enough
    If you don't understand my answer, don't ignore it, ask a question.

  9. #9
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: complexity of code??

    What Norm said...
    The reason no one is answering you is because we don't do other people's homework here.

Similar Threads

  1. time complexity qustion
    By romavolman in forum Java Theory & Questions
    Replies: 1
    Last Post: September 18th, 2012, 07:45 PM
  2. time complexity qustion
    By romavolman in forum What's Wrong With My Code?
    Replies: 1
    Last Post: September 18th, 2012, 06:24 PM
  3. I need help for this time complexity measurment?
    By lulzimfazlija in forum Algorithms & Recursion
    Replies: 5
    Last Post: September 16th, 2011, 12:17 PM

Tags for this Thread