Home Tutorialhelp Comment Problem with this code

 
 

Comment

Mark
Problem with this code,
April 2, 2010 at 3:22 AM

---PROBLEM #1---
VARIABLE LO SHOULD BE LOW

** INCORRECT **
while ((lo <= end_low) && (start_high <= high)) {

** CORRECT **
while ((low <= end_low) && (start_high <= high)) {



---PROBLEM #2---
IF STATEMENT CONDITION SHOULD BE (( <= )), NOT SIMPLY ( < )

** INCORRECT **
if (array[low] < array[start_high]) {

** CORRECT **
if (array[low] <= array[start_high]) {

View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Java Beginners

code problem - Java Beginners
code problem  Dear sir, I'm havin a problem that suppose i've got... java script j2ee j2me sql plz help me to sort out this problem. thnx   Hi Friend, Please try the following sample code to solve your problem 

Java Beginners

code problem - Java Beginners
code problem  Dear sir, my problem is that I've a string value if this String value has "quit" then output should be "bye". i want to make this program using SWITCH CASE statement. how to implement String value in Switch plz 

Java Beginners

code problem - Java Beginners
code problem  Dear sir, My problem is that i have some string value and in some case i want to remove all the value of this string, i tried this code- Response.str.clear(); but it shows some error called "response package 

Java Beginners

Problem with code - Java Beginners
Problem with code  Hi Deepak. Im a newbie here at your forum. I have got a simple code of mine which is having a little problem. When I compile it, i get an...,identifier expected'...error. Could you help me out? Thank you 

Java Beginners

code problem - Java Beginners
; Hi friend, Code to help in solving the problem : import java.io....code problem  Dear Sir, I've to make a program where there are 10... in Java visit to : http://www.roseindia.net/java/example/java/io/ Thanks 

Java Beginners

code problem - Java Beginners
code problem  Dear sir, I have an excel file in D: drive called today.xls, i want to open it thru java program, what code would be compatible plz help me  Hi friend, Code to help in solving the problem : import 

Java Beginners

code problem - Java Beginners
code problem  Dear sir, my problem is given below: suppose a file Carries the following lines- Name: john age: 45 Address: goa phone...; Hi friend, Code to help in solving the problem : import java.io. 

Java Beginners

code problem - Java Beginners
code problem  Dear sir, my question was actually how to find a particual line's contain, example if a file contains- hy, how r u? regrd, john... your problem in details. Which keyword search the line. Thanks 

Java Beginners

code problem - Java Beginners
of program. thnx  Hi friend, Code to help in solving the problem...code problem  Dear sir, I've some integer value in ArrayList like- 10 40 30 i want to add them and print should be like- "total value 

Java Beginners

code problem - Java Beginners
code problem  Dear sir, my problem is that, i have two Combobox one.... plz tell how to code this program.   Hi Friend, You can use the following code: ComboBox var arr = new Array(); arr[0] = new 

Java Beginners

code problem - Java Beginners
code problem  Dear sir, I've some string called "JohnSon" that has to be crypted first and then decrypted, how to crypt and decrypt data plz tell me.  Hi friend, Code to help in solving the problem : public 

Java Beginners

code problem - Java Beginners
code problem  My code is below: import java.io.*; class FileRead...()); } } } Dear sir, my problem is that suppose i enter line number: 3 if line... your code and then again try it : import java.io.*; class FileRead 

Java Beginners

code problem - Java Beginners
code problem  i've to send a login packet( username & password..., what code should be compatible, as i heared with UDP programing there is no Guarantee of packet's delevery so send me code made of TCP, plz help me 

Java Beginners

Code problem - Java Beginners
Code problem  Hi. I want to create a drop down button,where the value will be hard coded and on selecting an option another drop down button... and these values will come from the database. Can anyone help me with the code 

Java Beginners

code problem - Java Beginners
code problem  1)what is accurate use of access specifiers (plz give me all uses in options)..? 2)In folllowing options which can be used... and methods. Java provides some access modifiers like: public, private etc 

Java Beginners

code problem - Java Beginners
code problem  I want to write a program that read a string and prints the following 1)number of digits 2)number o lower case characters 3)number of space charaters Here is the code which I suppose is almost correct.However 

Java Beginners

code problem - Java Beginners
code problem  Dear sir, I want to print some line with (") this sign,like: output should come ("hello world") instead of (hello world) thnx  hi friend, If you want to print "hello world",you have to use 

Java Beginners

code problem - Java Beginners
code problem  1)what is accurate use of access specifiers (plz give me all uses in options)..? 2)In folllowing options which can be used by the inner class....? a)private instance variables b)public instance variables c 

Java Beginners

code problem - Java Beginners
code problem  Dear sir, i'm making a program where characters of a string are being displayed having its length thru a loop, like- s a t i s h i want to store them as sequence in a StringBuffer like "satish" how 

Java Beginners

problem in java code - Java Beginners
problem in java code  In displaying an matrix in normal java code we use two for loops...When i attended an interview.....the hr asked me to display the matrix by only using one loop....there should be any condition or other 

Java Beginners

java Code Problem - Java Beginners
java Code Problem  Hi Sir. i am creating one java program in which i want to remove unsed variables from java program and store it into another name or same name.for example,my program is as follows. class Prog1 { int 

Java Beginners

java - code problem - Java Beginners
java - code problem  hi I want to create log file for my new project. so i choose logging class from util package. But here print some unwanted texts.... Other Wise send ur code. Thanks 

Java Beginners

java code problem - Java Beginners
java code problem  i have created a JTable in Class1 now i need to use the same JTable in another class Class2, to edit some values. i am not getting..., Try the following code: 1) ClassA.java import java.io.*; import 

Java Beginners

jsp code problem - Java Beginners
jsp code problem  Hi, I have a problem with else part. It did not show the message box when the result set is null. plz, help me. thank u in advance 

Java Beginners

html code problem - Java Beginners
html code problem  Hi, Thank u for fast reply. In HTML form, more than one file 'action' is possible or not. regards, sakthi  Hi friend, In HTML in one form having One file action is possible. Thanks 

Java Beginners

java script code problem - Java Beginners
java script code problem  Dear sir, my problem is that, suppose i've two HTML files(with java script), out of them one has function EMPLOYEE_DETAILS() i want to call this EMPLOYEE_DETAILS() fuction to another Html file, how 

Java Beginners

Problem with Java Source Code - Java Beginners
Problem with Java Source Code  Dear Sir I have Following Source Code ,But There is Problem with classes, plz Help Me. package mes.gui; import javax.swing.JOptionPane.*; import java.sql.*; import javax.swing.*; import 

Java Beginners

Avl tre problem code - Java Beginners
Avl tre problem code   package DataStructures; // BinarySearchTree class // // CONSTRUCTION: with no initializer // // ******************PUBLIC OPERATIONS********************* // void insert( x 

Java Beginners

Java Problem - Java Beginners
, Code to solve the problem : import java.io.*; public class PrimeNumber...Java Problem  Write a program 2 input a positive integer n and check wheter n is prime or not and also know the position of that number in the prime 

Java Beginners

for a problem in coading - Java Beginners
for a problem in coading  what is the problm in following coading...(String[] args) { mywindow (); } }   Hi Friend, There is no problem with the code. Please execute it like as follows : Compile : javac 

Java Beginners

java problem - Java Beginners
java problem  Suppose list is an array of five components of the type int.What is stored in list after the following Java code executes? for (i... WAIT YOUR RESPONSE....  Hi friend, Code : import java.util. 

Java Beginners

Java Problem - Java Beginners
Java Problem  How to create executable file of a java program.That is steps to create a Jar File of a Java Program  Hi Friend, Try the following code: import java.io.*; import java.util.jar.*; public class 

Java Beginners

JAVA Problem - Java Beginners
JAVA Problem  please help me!!!! How can i code in java using Two-dimensional Arrays? 88 90 94 102 111 122 134 75 77 80 86 94 103 113 80 83 85 94 100 111 121 68 71 76 85 96 110 125 77 84 91 98 105 112 119 81 85 90 96 102 

Java Beginners

Java Problem - Java Beginners
Java Problem  How to create a jar file of a program  Hi Friend, Try the following code: import java.io.*; import java.util.jar.*; public class CreateJar { public static int buffer = 10240; protected void 

Java Beginners

java problem - Java Beginners
java problem  a) Binary numbers is important in computers. Binary... available in Java that will allow us to convert from denary integer (base 10..., To convert integer to binary, try the following code: import java.util. 

Java Beginners

java problem - Java Beginners
java problem  Write a program that could be used to help children practise their subtraction problems. The problems involve only integers between 10... the main method  Hi Friend, Try the following code: import 

Java Beginners

Problem in coding - Java Beginners
friend, Code to help in solving the problem. public class Stimulates...Problem in coding  How many times do you have to roll a pair of dice before they come up snake eyes? You could do the experiment by rolling the dice 

Java Beginners

problem 1 - Java Beginners
problem 1   Hi, please help me!!!! How can i code in java using Two-dimensional Arrays? This question is related to the one i posted before. this is my input data file: 88 90 94 102 111 122 134 75 77 80 86 94 103 113 80 

Java Beginners

arraylist problem - Java Beginners
arraylist problem  Hello.... I wrote the following code for adding a string array into an array list along with other strings... and to display the string array... But there's a problem with this... import java.util. 

Java Beginners

problem with main - Java Beginners
problem with main   import javax.swing.*; import java.awt...._DEGREES_SHOWN); } } i have copied this code from a book and i have a problem. when i compile it appears this message: java.lang.NoSuchMethodError: main 

Java Beginners

Bid Problem - Java Beginners
in this application explain in details : Code to help in solving the problem...!"); } } } For more information on Java visit to : http://www.roseindia.net/java/ Thanks 

Java Beginners

problem - Java Beginners
30 (-30) Sneezy 60 (0) Bashful 80 (20) how can i code in java if want something like this using array?   Hi friend, Code to solve the problem : import java.io.*; public class JavaMeanDeviation 

Java Beginners

problem - Java Beginners
30 (-30) Sneezy 60 (0) Bashful 80 (20) how can i code in java if want something like this using array?   Hi friend, Code to solve the problem : import java.io.*; public class JavaMeanDeviation 

Java Beginners

Compilatation problem - Java Beginners
Compilatation problem  Hi All, I had uninstalled Java1.5 and installed java1.4 for some reasons. Before i was able to compile and execute the code... link: http://roseindia.net/java/learn-java-in-a-day/download-and-install 

Java Beginners

Problem with picture - Java Beginners
Problem with picture   Hi, I Develope a School Automated System that takes a details from the user interface and deposited into the database... code: 1)page.jsp: Display file upload form to the user 

Java Beginners

Problem in java 1.6 - Java Beginners
Problem in java 1.6  Am facing problem in java 1.6 . Ex. In a Frame......  Hi friend, Give source code where you having the problem For read more information on java visit to : http://www.roseindia.net/java 

Java Beginners

htmlcode problem - Java Beginners
is the code for this.Is it possible in html. pls send answer anyone as son as possible Thank you   Hi Friend, Try the following code 

Java Beginners

htmlcode problem - Java Beginners
to display textbox pls send me code for this Thank you for this help   Hi Friend, Try the following code: numLinesAdded=0; function 

Java Beginners

problem - Java Beginners
.. for eg. o.00002  Hi aman I am sending code according to your..."); } } ------------------------------------- Read for more information. http://www.roseindia.net/java Thanks 

Java Beginners

coding problem - Java Beginners
coding problem  hi! i declared date as date datatype in oracle now i need to retrieve date from database to my java code.how can i please help me urgent   Hi Friend, We are providing you a code that will retrieve 

Java Beginners

script problem - Java Beginners
() { if(document.add.fname.value=="") { alert("Enter fname"); } else{} } This is the code 

Java Beginners

coding problem - Java Beginners
); } stmt1.close(); return a; } i wrote this code in one class and now i 

Java Beginners

scanner problem - Java Beginners
scanner problem  the program that enters sides of the triangle using scanner and outputs the area of triangle  Hi Friend, We are providing you a code that will calculate the area of triangle having base and height 

Java Beginners

date problem - Java Beginners
; Hai, Here is a code for you 

Java Beginners

loop problem - Java Beginners
something. Can you help?   Hi Friend, Try the following code: class 

Java Beginners

coding problem - Java Beginners
coding problem  i used netbeans software to develop frame.now i need to add values to JList from ArrayList object  Hi Friend, Try the following code: import java.util.*; import javax.swing.*; public class 

Java Beginners

Inheritance problem - Java Beginners
); } }   Hi Friend, In your code,Base_Class inherits all 

Java Beginners

logout problem - Java Beginners
logout problem  hi,guys thanks for the solutions for previous query.Now I am end of my project.I have written my Logout code as I am... Logout You have logout. Please try again Login   Hi<html><head>< 

Java Beginners

complete this code (insertion sort) - Java Beginners
://www.roseindia.net/java/beginners/arrayexamples/index.shtml Thanks...++; } } return newArray; } }  Hi friend, Code to solve the problem...complete this code (insertion sort)  Your task is to develop part 

Java Beginners

java programming problem - Java Beginners
java programming problem   num=(a/b)*(c/d) In the problem, 'num' is given . "0<2" we have to find out the values of a,b,c,d upto five... ur code 

Java Beginners

java thread problem - Java Beginners
java thread problem  Hi Friends, My problem is related... LinkedBlockingQueue to send some runnable object . Samples Code : ThreadPoolExecutor... saw your code but not clear please send me full source code and explain in detail 

Java Beginners

array problem java - Java Beginners
components of the type int.What is stored in list after the following Java code...array problem java  PLS HELP ME NOW I NEED YOU RESPONSE IMMDEATLETLY...]; int num; Write Java statements that do the following: a. Call the method 

Java Beginners

java code - Java Beginners
java code  i m doing aproject on tsp can you provide me the entire source code for the problem in java for 10 cities   Hi Friend, Please send some more details. Thanks 

Java Beginners

Java Big Problem - Java Beginners
, Code to solve the problem : import java.io.*; import java.text.*; public...Java Big Problem  Input the current meter reading and the previous... on Java visit to : http://www.roseindia.net/java/ Thanks Vineet 

Java Beginners

Java Compilation Problem - Java Beginners
declaration it is giving the problem.  Hi friend, Give the code...Java Compilation Problem  Authors.java import java.util.*; import jsns.model.AbstractAgent; import jsns.model.IAgentActor; import 

Java Beginners

Java Compilation Problem - Java Beginners
Java Compilation Problem  I defines a class named as class Authors...; Hi friend, Give full details with source code. For more information on Java visit to : http://www.roseindia.net/java Thanks 

Java Beginners

java swing problem - Java Beginners
java swing problem  i doesn't know about the panel in swings here i had created one frame then created a panel and i added that to my frame but which... to make the that  Hi Friend, Try the following code: /*import 

Java Beginners

Java Programming Problem - Java Beginners
Java Programming Problem  Q. How write a program that asks the user's name, and then greets the user by name. Before outputting the user's name..., Code to convert string into upper case letters : import java.io.*; class 

Java Beginners

java code - Java Beginners
java code  Write a program that performs flashcard testing of simple... display a problem and get the user?s answer. Indicate whether the user?s answer is right or wrong for each problem, and display an ongoing score. You must use 

Java Beginners

Java Code - Java Beginners
Java Code  Code a do while loop that continues executing until the value of a string variable named code is equal to ?X? or ?x?. Within the loop....  Hi friend, Code to Solve Your Problem : import java.io. 

Java Beginners

problem regarding autoboxing - Java Beginners
problem regarding autoboxing    hello all , i have a problem... code it gives the output "value are same". And if i write the following code...; HI friend, Implement following code according to requirement 

Java Beginners

servlet program problem - Java Beginners
the code alone, reply me how to run or whether i hav to create a separate html file to run it  Hi Friend, Please clarify your problem. Thanks 

Java Beginners

java code - Java Beginners
java code  how to convert byte array into hexadecimal?  Hi friend, Code to help in solving the problem : class ByteToHex { public static void main(String[] args) { byte[] bytear = new byte[2]; bytear 

Java Beginners

java code - Java Beginners
; Hi friend, Code to help in solving the problem : import java.io....java code  i need a program that will arrange the numbers from greatest to least. but i can only enter numbers ranging from 1 to 100,000 

Java Beginners

coding problem in netbeans - Java Beginners
coding problem in netbeans  hi, i have just started programming in netbeans,i'm facing a problem in a java application i create a jframe class...; Hi Friend, We are providing you a code where TextField of ClassA get 

Java Beginners

Java Code - Java Beginners
Java Code  How to display line charts by getting data from database..., Use JFreechart library. Here is the code: import java.sql.*; import...) { System.out.println("Problem in creating chart 

Java Beginners

Java Code - Java Beginners
Java Code  how to develop piecharts by getting values from database... the following code: import java.sql.*; import java.io.*; import... (IOException e) { System.out.println("Problem in creating chart 

Java Beginners

Java code problem
Java code problem  Please check the errors,if any,in this code...i am a java beginner import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.Map 

Java Beginners

Java code - Java Beginners
Java code  My Question is... In this there is Textfield..."); } } In this im writing the code only for alphabet A..which is also same for all alphabet..Please help me and solve my problem   Hello 

Java Beginners

login problem in java bean - Java Beginners
login problem in java bean  login.jsp no longer redirects to the appropirate page. my bean code is correct and while seeing in error logs, it is displaying login failed and login success correctly. can u help me with the code 

Java Beginners

Open Jgraph Problem - Java Beginners
" ); app.setVisible( true ); app.vgraph.layout(); } } //end of code. My problems... on this. I am a newbie in Java language. Thank you. Ulamraja 

Java Beginners

JComboBox Display Problem - Java Beginners
3-1-2010 4-1-2010 Please help me  Hi Friend, Try the following code 

Java Beginners

script code - Java Beginners
script code  hi, thanks for ur fast reply. plzz, give me a sample code for PHP function under script tag. regards, sakthi  Hi friend, Code to help in solving the problem : Hello PHP World 

Java Beginners

code need - Java Beginners
code need  hi i want to code doing for this. If i have enter the text file in my java project. example input is 1,2,3,4,5(it is in input text file...)  Hi Friend, Try the following code. We hope this will help you 

Java Beginners

Jsp Code - Java Beginners
Jsp Code  Hi, I am new to java programming & as per the requirement, i need to implement a 'SEARCH' functionality which will search the database... to find a unique solution to this problem. Its really urgent..... Plz 

Java Beginners

jsp code - Java Beginners
jsp code  hello sir i have a problem in in loop while(itr.hasNext()){ String compnamvalue=itr.next().toString(); StringTokenizer searchstrtoken...   Hi Friend, Try the following code 

Java Beginners

Java GUI problem with linklists and administration - Java Beginners
Java GUI problem with linklists and administration  Hi, I'm having trouble making a GUI interface in java, where a list of names are displayed using a jList. The java program should be able to allow the user to add names, remove 

Java Beginners

simple code - Java Beginners
simple code  to input a number and check wether it is prime or not and print its position in prime nuber series.  Hi friend, Code to help in solving the problem : import java.io.*; class PrimeNumber { public 

Java Beginners

program code - Java Beginners
, This code will be helpful to you in solving your problem. import java.util....program code  Design and write a Java application that takes as input a single letter and displays the corresponding digit on the telephone 

Java Beginners

Timer in the code - Java Beginners
); } } If you got any error or any problem, then send your code. Thanks.... I'm confused about where and what i should put into the overall code. Also I can't quite figure out how to write the code for the GUI. Could anyone please help 

Java Beginners

JSP code - Java Beginners
: ----------------------------------------------- code rep_number desc...;% db.connect(); rsUser = db.execSQL("SELECT * FROM reportID WHERE code = 'J...")) { query = "UPDATE reportid SET rep_number ='"+repID+"' WHERE code = 'J 

Java Beginners

JSP Code - Java Beginners
JSP Code  Dear frnds, I have a problem where i need to display...;Hi Friend, Try the following code: function city(){ var cid...; " > For the above code, we have created following 

Java Beginners

Error in a code. - Java Beginners
Error in a code.  This is the question I posted yesterday: "I'm.... I'm confused about where and what i should put into the overall code. Also I can't quite figure out how to write the code for the GUI. Could anyone please help 

Java Beginners

insertionSort - Java Beginners
Sorted list: 1 2 4 7 9  Hi friend, Code to solve the problem.../beginners/arrayexamples/index.shtml Thanks...insertionSort  1 Problem Task Your task is to develop part 

Java Beginners

Java problem - Java Beginners
Java problem  what are threads in java. what are there usage. a simple thread program in java  Hi Friend, Please visit the following link: http://www.roseindia.net/java/thread/index.shtml Thanks 

Java Beginners

Help with cypher and key problem in Java - Java Beginners
Help with cypher and key problem in Java  So far I have a program that asks a user for a message and a key amount and displays an encrypted message... code. import java.io.*; import java.lang.*; public class CharToString 

Java Beginners

Java Programming and Coding problem - Java Beginners
Java Programming and Coding problem  How write a program that helps the user count his change. The program should ask how many quarters the user has...;Hi buddy I hope this code helps you import java.io.*; import 

Java Beginners

FTP file copy problem? - Java Beginners
FTP file copy problem?  Hi, Can any one tell me how to set file... need local file time like (Today, December 29, 2009, 5:09:33 PM). Below code I am using for uploading files to server. [code] File f = new File(localfilePath 

Java Beginners

Java problem - Java Beginners
Java problem  I have an image in my application and I need to restrict the image path view on the browser. Noone should be able to right click and see the image path. Please help 

Java Beginners

java programming problem - Java Beginners
.. http://www.roseindia.net/java/beginners/java-word-count.shtml http://roseindia.net...://www.roseindia.net/java/beginners/java-word-count.shtml http://roseindia.net/java...java programming problem  Hello..could you please tell me how can I 

Advertisements Advertisements
 

 

 

DMCA.com