File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes help with code Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "help with code" Watch "help with code" New topic
Author

help with code

Emaney Sidd
Greenhorn

Joined: Mar 11, 2006
Posts: 2
Can any one please help me finish the following code, filling in the blanks
PLZ this is very urgent, ......soon as possible

priavte void NSort(int first, int last, int increment)
{
for (int i = _ ; i <= _ ; _ )
{
int temp = contents[ _ ];
int j;
for (j= _ ; _ ; _ )
{
contents[ _ ] = contents[ _ ];
}
contents[ _ ] = temp;

}
}

[ EJFH: Remove request to take this offline. ]
[ March 11, 2006: Message edited by: Ernest Friedman-Hill ]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24081
    
  15

Hi,

Welcome to JavaRanch!

We'll be glad to help. Show us what you've done so far, and we can tell you if it's right or not, and suggest where to go next.


[Jess in Action][AskingGoodQuestions]
Emaney Sidd
Greenhorn

Joined: Mar 11, 2006
Posts: 2
private void NSort(int first, int last, int increment)
{
for (int i = 0 ; i <=currSize ; ++i)
{
int temp = contents[ currSize];
int j;
for (j= 0 ; j<contents[currSize] ; ++j )
{
contents[ currSize] = contents[ temp];
}
contents[ i ] = temp;

}
}
Garrett Rowe
Ranch Hand

Joined: Jan 17, 2006
Posts: 1295
Well, the first thing I can see is that there is no variable in this method called "currSize". Is currSize a class scoped variable?


Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Mark Van Tuyl
Ranch Hand

Joined: Mar 22, 2002
Posts: 60
I've formatted your code and added some comments. Hope it helps


<a href="http://www.catb.org/~esr/faqs/smart-questions.html" target="_blank" rel="nofollow">How To Ask Smart Questions</a>
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: help with code
 
Similar Threads
optimize the following code
wrapper class
display error
u_int8_t in java
Simple program: NEED HELP!!