malgainis
Feb 11 2005, 12:36 PM
does anyone have a decent JAVA method that will sort an array from smallest-to highest?  The one i'm trying to write doesn't seem to work... or if you could look at mine below, and tell me what i did wrong, that'd be nice to.(if it reallllyyyyyyyyy sucks, please dont laugh to loud  ) This should take an array and then calculate how many of a number is in it, add it to the first slots of another array, and then repeat until the 2nd array is full to the length of the array that is sent to it. After which it will get the median and return it. CODE public static int getMedian(int[] list, int countt) { [tab][/tab][tab][/tab] [tab][/tab]int median; [tab][/tab]int lowestNum = 1; [tab][/tab]boolean newNum = false; [tab][/tab]int[] orderedArray = new int[countt + 1]; [tab][/tab]int count = 0; [tab][/tab]int index = 0; [tab][/tab][tab][/tab] [tab][/tab][tab][/tab] [tab][/tab]while(index < countt) [tab][/tab]{[tab][/tab] [tab][/tab][tab][/tab]if(count == 0) [tab][/tab][tab][/tab]{ [tab][/tab][tab][/tab][tab][/tab] int minNum = lowestNum; [tab][/tab][tab][/tab][tab][/tab] lowestNum = 100; [tab][/tab][tab][/tab] for(int i = 0; i < list.length; i++) [tab][/tab][tab][/tab] { [tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab] if(list[i] > minNum && list[i] < lowestNum) [tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab] {[tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab] lowestNum = list[i]; [tab][/tab][tab][/tab][tab][/tab] } [tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab] } [tab][/tab][tab][/tab] }[tab][/tab] [tab][/tab][tab][/tab]for(int i = 0; i < list.length; i++) [tab][/tab][tab][/tab][tab][/tab]{ [tab][/tab][tab][/tab][tab][/tab][tab][/tab]if(list[i] == lowestNum) [tab][/tab][tab][/tab][tab][/tab] { [tab][/tab][tab][/tab][tab][/tab][tab][/tab] count++; [tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab] list[i] = -1; [tab][/tab][tab][/tab][tab][/tab][tab][/tab]} [tab][/tab][tab][/tab][tab][/tab] }[tab][/tab] [tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab] for(int x = 0; x < count; x++) [tab][/tab][tab][/tab]{[tab][/tab][tab][/tab][tab][/tab] [tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab] orderedArray[index] = lowestNum; [tab][/tab][tab][/tab][tab][/tab] index++; [tab][/tab][tab][/tab]}[tab][/tab][tab][/tab] [tab][/tab][tab][/tab]count = 0;[tab][/tab][tab][/tab] [tab][/tab]} [tab][/tab][tab][/tab]median = (index / 2) + 1; [tab][/tab][tab][/tab]return median;[tab][/tab][tab][/tab] [tab][/tab][tab][/tab][tab][/tab] }
Comment/Reply (w/o sign-up)
malgainis
Feb 11 2005, 12:39 PM
egads... forgot to insert the <PRE> tag:( sry if its a little hard to read for anyone who looks at it:(
Comment/Reply (w/o sign-up)
jipman
Feb 11 2005, 01:22 PM
Euh... Have you heard of the bubblesort technique? http://en.wikipedia.org/wiki/Bubble_sortI know the Visual Basic version of it... If you want it, ill post it. Good luck
Comment/Reply (w/o sign-up)
marijnnn
Feb 11 2005, 02:38 PM
aight let's say you have the array with the beautiful name "array" that has some elements in it. this is a method to sort it. CODE INT tmp; int lenght = array.length; for(int i = 1; i < length; i++){ tmp = array[i]; int j=i; while (tmp <array[j-1]){ array[j]=array[j-1]; j--; } array[j]=tmp; } this should work. haven't tested it though. if you want to use double's instead of int's , just change the INT (in capitals) into double. that should do the trick it's not the fasted method but it works. i've had 2 years of algoritms and can provide you with extreme fast algoritms if you need a way to sort thousands of numbers  one more thing, about your code: try to post it in betweend code-tags next time, so it's a bit structured  and: it's very C++. you're not using the benefits of java. like the fact that the lenght of an array is stored inside it (array.lenght) i bet you learned C++ first 
Comment/Reply (w/o sign-up)
miCRoSCoPiC^eaRthLinG
Feb 11 2005, 03:09 PM
If you want to do some more reading on sorting alogrithms, go to this site: http://linux.wku.edu/~lamonml/algor/sort/sort.htmlThey've got discussions on a pretty decent list of commonly used sorting algorithms, namely: - Bubble sort
- Heap sort
- Insertion sort
- Merge sort
- Quick sort
- Selection sort
- Shell sort
You'll find detailed discussions on the pros and cons of each method as well as the efficiency of each sorting algorithm. Working code samples in C/C++ are also provided, and judging from your coding style you shouldn't have much difficulty porting them to java. Have you grabbed a copy of JavaDocs yet - I think you need one (it's the Java comtemporary of the MSDN libraries), coz as marjinn pointed out, you should use the benefits that the java framework provides you to the fullest extent. Makes life easier as well as in certain cases it actually optimizes and speeds up your code All the best...
Comment/Reply (w/o sign-up)
malgainis
Feb 16 2005, 06:10 PM
A much delayed thank you for posting that:) and another note: this version of it will work if you have a array that has a certain length, but number of numbers in it is controlled by a sentinel: where counta is a number count of the elements in the array CODE public static int[] sort(int[] array, int counta) { int tmp; int length = counta + 1; for(int i = 1; i < counta; i++) { tmp = array[i]; int j=i; while (tmp < array[j-1]) { array[j]=array[j-1]; j--; } array[j]=tmp; } return array; }
Comment/Reply (w/o sign-up)
bagas199
Feb 22 2005, 06:20 AM
btw ... you can use simple method sort an array of int ..  java.util.Arrays.sort(int [] array);
Comment/Reply (w/o sign-up)
eyvind
May 12 2005, 03:00 AM
DON"T USE BUBBLE SORT!!!! it is just realy, realy, rreally, slow. Think of bubble sort as a bottle of some substanvce of low viscosity with bubbles speead throughout it, it takes a long time for the bubbles to slowly climb their way to the top, as with the bubble sort, it takes a long time for teh elements to slowly reach tehir appropriate position. the fastest is Quick Sort, but, dependign on teh order and value of the elemnts alreadsy in the array, it is somettimes faster and sometimes slower, but on average, it is faster, at least, than bubble sort (Thoughthat isn't to asay very much). Insertion is also slow, it loops throught he vaues and inserts the values in order at the beginning (and then it ahs to move all tehj other elements over one to maek room for it whch takes a lot of time). Well, you should basically read about it yourself and decide whch one is most applicable, just as long as you don't use bubble sort.
Comment/Reply (w/o sign-up)
vhortex
May 13 2005, 11:31 PM
QUOTE (eyvind @ May 12 2005, 11:00 AM) DON"T USE BUBBLE SORT!!!! *** Well, you should basically read about it yourself and decide whch one is most applicable, just as long as you don't use bubble sort. Actually I do have this really bad habit of mixing stuffs.. I do use bubble sort but not in the native why that it is laid out.. I combine it with some of the other algorithym.. once you get the idea on how those sorting stuffs work, there will be a point that you will discover the loop holes or bottle necks that they present.. A good thing for you to know is to learn all the principles of all the sorting algorithym, study the pit fall and the advantages and combine those into a newer algo.. Be sure also to have lotsa time testing and benchmarking..
Comment/Reply (w/o sign-up)
ykf
May 14 2005, 07:08 AM
Why don't you just use the builtin java sorting function in java.util package, Arrays.sort(int[] a), to do that? The builtin function use quick sort, which is much more effective than the method you described. Also because it's well published (it's here since Java 2), it's already heavily tested and sure will not have any bugs, rather than coded by yourself.~~
Comment/Reply (w/o sign-up)
shotgun
Aug 24 2008, 06:10 AM
There are lot's of Array sorting algorithm today, and there is no one best than the other, you will have to choose the one that fits to you depending on the type of data that you need to sort. In my case I use QuickSort most of the time, is a divide and conquer algorithmic paradigm. On average, makes O(nlogn) comparisons to sort n items. However, in the worst case, it makes Θ(n^2) comparisons(which is the typical case for other known algorithm like bubble sort). You can use java.util which brings a class with diverse types of algorithm including this one. Here you have the code also: CODE 1. pivot = list[sup]; 2. i = inf; 3. j = sup - 1; 4. cont = 1; 5. if (inf >= sup) 6. return; 7. while (cont) 8. while (list[i] < pivot) { ++i; } 9. while (list[j] > pivot) { --j; } 10. if (list[i] > list[j]) 11. temp = list[i]; 12. list[i] = list[j]; 13. list[j] = temp; 14. else 15. cont = 0;
16. temp = list[i]; 17. list[i] = list[sup]; 18. list[sup] = temp; 19. QuickSort (list, inf, i - 1); 20. QuickSort (list, i + 1, sup);
------------- OS:Windows Vista Ultimate Sp1 MD:Asus P5N-E CPU:2.40GHz/Intel Quad Core Q6600 RAM:Corsair Dual Channel 4GB 800Mhz VC:XFX GeForce 9800 GTX/512MB
Comment/Reply (w/o sign-up)
java-area
Apr 9 2008, 02:17 PM
QUOTE(ykf @ May 14 2005, 12:21 PM)  He can always implement Comparator interface to do virtually ANYTHING he want. So I wonder why he wants to reinvent the wheels... after all, libraries are tools which makes you NOT to redo what was already done. I think it is the best solution, provided by Java API - we can simply put desirable business logic of sorting into the method "Comparator::compare()". I do not any reasons to invent anything else. For example: import java.util.Comparator; public class MyItem implements Comparator { ....... public int compare(Object o1, Object o2) { // your business logic of sorting } public boolean equals(Object obj) { // see Sun comments here } } So, we can put objects of MyItem class into appropriated collections (for example, any implementation of SortedSet interface: TreeSet etc.)
Comment/Reply (w/o sign-up)
xboxrulz
Mar 28 2008, 10:39 PM
This is my code for an array sorter. It's quite efficient for counting too. CODE /** * * @author xboxrulz * Source Code is released under CDDL if requested. * */ import java.util.Arrays; public class Main {
/** * @param args the command line arguments */ public static void main(String[] args) { int intCount; String strNames[] = {"Gary", "Adrian", "Corey", "Alex", "Adrien", "Josh", "Zev"}; for (intCount=0; intCount<=6;intCount++) { Arrays.sort(strNames); System.out.println("Hello\t" + strNames[intCount]); } }
} Unlike the code provided by the poster above, this one is very human-readable. Names are people in my class. xboxrulz
Comment/Reply (w/o sign-up)
Umar Shah
Mar 28 2008, 10:37 PM
Now in this example i'll demonstrate one of my favourite O(n^2) sorts. This one is called insertion sort. [/code] public class InsertionSort { public static void main(String args[]) { int array[] = new int[10]; for (int i=0; i < array.length; i++){ array[i] = (int)(java.lang.Math.random()*100); } insertionSort(array); for (int i=0; i < array.length; i++){ System.out.println("Val of array[" + i + "] = " +array[i] ); } } public static void insertionSort(int arr[]) { int j=0; for (int i=1; i<arr.length;) { if(arr[i]<arr[j]){ int tmp =arr[j]; arr[i]=arr[j]; arr[j]=tmp; if(j>0){ j--; } else { j=i; i++; } } else { j=i; i++; } } } } [/code] Although we dont have two nested loops in this example , nonetheless it worls like two nested loops. the outer loop is only iterated if the present array upto position i is completely sorted. Otherwise j is decremented upto 0 so that the new element a[i] is inserted at its proper position in the partial array.
Comment/Reply (w/o sign-up)
Umar Shah
Mar 28 2008, 10:25 PM
Next I'll try to demonstrate a relatively simpler sort called Selection sort; CODE public class SelectionSort { public static void main(String args[]) {
int array[] = new int[10]; for (int i=0; i < array.length; i++){ array[i] = (int)(java.lang.Math.random()*100); } selectionSort(array);
for (int i=0; i < array.length; i++){ System.out.println("Val of array[" + i + "] = " +array[i] ); }
}
public static void selectionSort(int arr[]) { for (int i=0; i<arr.length; i++) { for (int j=i+1; j<arr.length-1; j++) {
if(arr[i]>arr[j]){ int tmp =arr[j]; arr[i]=arr[j]; arr[j]=tmp;
} }
} } } in this example the inner loop just compares all the elements from position i to the end to find the mininmum one to be placed at position i, the position determined by each iteration of outer loop.
Comment/Reply (w/o sign-up)
Similar Topics
Keywords : array, sorting, hava, decent, java, method
- Java Mouse Movement.
(2)
Java Memory Leak?
(2) I have been using the picking tool with setShapeCylinderSegment (this returns infinit results but
is capped). It works just fine for me (in terms of what it does) and it wasn't until just
recently I noticed that it has been causing my program to spike the memory. I have looked through
Google to see the problem and apparently it is caused a memory leak. I have tried to solve it by
simply setting all the variables to null after they are used but this doesn't help. Is there
something I can do to or a free software I can use to find the exact variable that is causin....
Java And Sql: Data Mismatch
(6) Alright, I'm having some really funky issue with this. I know it's a mismatch (obviously)
and I want to know if the Astahost community members can help me solve this issue. It's been
annoying me a lot of late. CODE try{ libSQL myAddNewData = new libSQL(); String
strRownum =(String.valueOf(jComboBoxLName.getSelectedItem())); if (intChoice == 1){
myAddNewData.AddNewData("INSERT INTO CUSDATA (FIRSTNAME, LASTNAME, PHONE, SIN) VALUES
('"+ strUserData +"','" + strUserData + "','" + strUserData + "&....
Simple Java Question
One Variable; Multiple Classes (5) I’m probably the only person that is able to do so much with Java3D and yet still can't
even get some of the Java basics down. Anyway is it (and if so how is it) possible to make a
variable editable and readable in multiple class files? It seems like this should be an easy
question to answer, but here is a little code to help you understand what I am talking about. CODE
public class test extends Applet{ public int Col = 0; if(Col==1){ } } class
TestB extends Behavior { if(collision == true){ Col = 0; }else{ Col = 1; } } Tha....
Java Java.security.accesscontrolexception
(6) I have looked all over the web for a solution and none of them seem to work. Anyway, I am trying to
load a 3d object onto a scene with a java applet and I get the following error. CODE
java.security.AccessControlException: access denied (java.io.FilePermission object.obj read) I
think that it has to do with my java.policy permissions, but I cant find anything that will fix it.
Has anyone ever seen this error and/or know a solution to it? I am looking for a solution that will
work on other people's computers without them downloading anything extra (other then ....
Setting Up Java Correctly
(11) First thing, I know the pictures say update 3, I'll update them to 4 soon... Since there's
been alot of people saying this bot doesn't work!1!1!!elevenone1!11exclamination! I'll tell
you how to set up your Java, correctly Before I say anything, if you get this problem Exception in
thread "main" java.lang.NoClassDefFoundError: mudclient press any key to continue. . . This means
you have set up your Java incorrectly, follow the tutorial properly Also if you are not an
Administrator on your computer you can't change the Enviromental Variables. If yo....
Loading 3d Models In Java?
(2) I am currently using a 3D cad software to make models. I want to know if it and how it is possible
to load 3D models using Java. I would like to make a game in java (I know I should be using OpenGL
for this, but Java seems more secure). Now I have been looking all over the web (And Amazon books)
for how to load 3D objects. I think java has loaders that convert objects into java objects but I
can't figure how to use them. I have tried using Java 3D and a bit of JOGL but I have very
little knowledge about them other then making basic things like cubes (not models). Is ....
Java Db Help Pls
(2) Now I am a compleate newbie to java. Now just from saying that I will get posts that say "read the
basics first" ect. I know the basics but the way I learn isn't just by going over basics. What I
want to do/know is if it is possible to connect to a MySQL Database using java. Is it possible and
if so how? Tutorials and links to tutorials are welcome along with maby a list of required packages
and an example code of connecting/selecting data. This is for MySQL not SQL (I don't know if
there is a major difference in java or not). I am currently using SDK1.4.2_16. I ....
Graphcal User Interfaces In Java
How do you make them? (4) Ok, right now I am currently using eclipse, however I can change to whatever if there is something
else that would be better for this. But I have made a number of java applications, but they all
simply use the command line for doing their user input and output. However, I have been interested
in learning how to program graphical user interfaces in java, and was wondering if somebody could
point me in the right direction, with some easy to understand and follow tutorials. Also, once I
have done that, what about making a java program that can be easily executed? (I know t....
Java Sdk Vs. Java Jdk?
What is the difference? (2) Ok, so previously I had installed the java SKD on my computer (the one that comes with netbeans), as
of right now it is version 1.4.2_13 and I really didn't pay much attention to the version.
Everything seemed to work ok for what I was doing, although I wasn't using netbeans, instead I
have been using eclipse. (Since I am doing this for a class at school and that is their IDE of
choice) Anyway my programs have to compile at the command line (not just work in eclipse). I have
been able to get them to work in eclipse fine, but I am having trouble when I go to the ....
Bluetooth And Java
(5) Hey all Java programmers on Astahost, I'm wondering is it possible for Java to communicate to
another computer through a Bluetooth device? The reason I ask this is because I want to create an
instant messenger that would be using the Bluetooth "network" so that people can use their computers
to communicate from one to another without the use of the Internet. This is very useful in
situations where you want to talk to a friend nearby but does not have access to the Internet and
cannot talk to them in person. Thanks, xboxrulz....
Need To Modify Xml Attribute Using Java
(7) hi, Im new to xml parsing and dont know much about. I need to modify the attribute val of a tag in
a complex xml file im using xpath query to retrieve the node but xpath is read only and cannot
modify. Im not able to use DOM as the xml is very complex and im not able to go to the exact node....
Mozilla And Java!
Step by step help needed from seniors in programming for developing a (2) Dear senior Members, I am a 18 year old boy. Just some months ago...I thought of an idea of
developing an extension for mozilla firefox...one of the most popular web browsers out in the world.
I wont disclose the complete Idea right here but the useful ness of the idea: The extensionm I
thought about can be used to significantly reduce the bandwith for high speed connections and time
for the slow connections given that the target person does use thw web for visiting mostly news
sites, forums and check mails...so all in al a busy person sittin gon a slower connection o....
How Do I Test A Java Aplication
(11) Well..can someone introduce me?(picture introduce is well)....
How To Create Exe File In Java?
(17) Dear friends I came to know that one can build exe files from java application. How this is
possible? According to me there is no such method in java to cerate exe files. However Microsoft
used to provide a free system development kit (SDK), for Java, which includes the jexegen tool. But
one need install Microsoft Java Virtual Machine to run such application. Some people suggest
InstallAnyWhere.....
Java Phone Book
A console base java phone book program (5) Hello everybody I wrote this program a few months back when I wan learning JAVA.I haven't
learned java yet though because its to vast. The program is console based. It uses the util package
of java in a great way. It keeps record in a flat file. You should create a Data file called
phone.dat in same folder where phone.java is kept. So here is the code:-(phone.java) CODE
import java .io .*; import java .util .*; import java.awt.event.*; public class phone {
public void new_record() { String id,name,city,add,number,total,list;
boolean b....
Other Sound Format Support
Sound in Java (3) I know how to play a sound file in an applet and an application. I was wondering though if anyone
knows how to make Java play other sound formats such as mp3, wma, etc.. Well especially an mp3. I
know Java already supports wav, au, and aif How do you play mp3's?....
Snake In Java
A game i programmed with a friend (2) My friend and I have been working on a project. It is called Snake, and its the old fashion snake
game that used to be on the first cell phones with games. Of course this 1 has a few more features
but we wanted to keep it simple. It was 100% programmed in Java, no support from other languages.
I am in Computer Science 2 AP at my high school, so its only my second year with Java, and its my
first programming language. I've found it extremely easy to learn. Once you understand how to
use the libraries, and read the JavaDocs then you can do almost anything without ....
How To Configure/intergrate Jboss 4 With Java?
(1) Can someone help me?....
On Why Java Is 'c'ooler!
additions / criticisms invited (10) im basically a C++ programmer and into Java only now..and i seem to falling in love with it. here
are my thoughts on why i think Java seems cooler /wink.gif" style="vertical-align:middle"
emoid=";)" border="0" alt="wink.gif" /> i invite people to add on to the list, im sure there are
great many things i have missed out..things im yet to be enlightened in Java! 1. no more of those
wierd pointers! this pointer thing always seemed to me something gone all wrong..something that
lacked better conception. thank god i dont have to use * and & alternatively to deal with on....
Java App To Web App
(12) I have this Java Application that is already coded which interacts with a database. Is there any
way that would be easy enough to launch this application via a local intranet? It is not in any
Applet package, but I do have the JARs. Can this be done without too much effort?....
Looking For A Java IDE
(26) Hello Java people! I'm starting to work more on java this spring (university stuff) and I think
I need a proper IDE. So far my java programming has been in little scale so editor and command line
compiling has worked just fine. So I'm looking for a good, free IDE. It does not need to have
fancy features, just what you'd expect from an IDE. My previous experience on IDEs limits
pretty much to MS Visual Studio. I've also tried out Borland's builders but I've hated
them, granted they all were quite old versions. So what IDEs you use and what y....
Video Streaming In Web Browser Through Java Or Jsp
video streaming in web browser (2) Can anyone give idea about video streaming in web browser through java or jsp I need to play video
presentation in my web browser to show all members of the company.For I want to put my video file in
web server and anyone can access that video just playing on their browser our web browser is
firefox. We don’t want to use any active X properties or any default media player in web browser
. Our Platform is linux fedora core4, web server is tomcat 5 . We read the JMF java media Framework
API, but I couldn’t understand how to use this in our server for linux. There is ....
Java By Example
(8) Java was the first programming language that I learned on my own...no teachers, no friends, just me
and the internet. One of the best aspects of Java is the heavy documentation provided by Sun and
every other Java developer out there. Here is a link to a site that lists loads of examples of Java
code. http://javaalmanac.com/egs/ ? They have examples of setting up a JDBC/ODBC connection for
database use, creating ZIP files for archival purposes, and simply showing you how to use vectors.
This site is great for learning the basics and building applications on top of i....
Download Java Ebooks
Java Books (17) Download java books from below sites http://www.gayanb.com/ The eBook links you've posted
contain a bunch of illegal eBooks. Be aware that this is in direct violation of our TOS . Links
removed. ....
Need Help: Find Lowest Character Using Java
(7) Heya guys, Been a looooong time eh, yeah well i was kinda buzy with college stuff and all those
assignments just keep pouring in. I have java this semester and i have "NO" idea how to go abt it, 1
reason being that my proff. is going real fast in the explaination part and i doubt she knows
anything in java /blink.gif' border='0' style='vertical-align:middle' alt='blink.gif' /> Newayz
, i was asked to do a small program in java , heres how it goes : I need to enter a word prefixed
by the number of letters in it, and the output should show me the smallest character ....
What Are The Advantages Of Java Vs C++?
(15) what are the advantages of c++ and what are the advantages of java? what one is more userfriendly,
and what one has more capabilities?....
Java Unlimited
Java,jsp,servlet,Swing,GUI Designing (14) /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> Common guys
and let have a chat over robust java! Cheers Arunkumar.H.G....
Using system date in java... How?
(7) How do u use system date in java? I only know how in jsp. In jsp, u need to do the code below to get
the sysdate String date = DateFormat.getInstance().format(new Date()); and you will be able to
get the system date which has the format 6/6/04 7:19 AM ______________________ iv tried to do this
in java import java.util.Date;public String getSysDate() { String date = "";
String date = DateFormat.getInstance().format(new Date()); return date; }
there's an error on the variable DateFormat., it cannot resolve symbol. does ....
java.lang.NullPointException
(4) hi, all, I have a question, can anybody give an answer? Thanks in advance. Why the following code
throws NullPointerException? String v =null;
System.out.println("aaaaa"+v==null?"":Integer.toString(v.length())); while the following code not?
String v =null; System.out.println("aaaaa"+(v==null?"":Integer.toString(v.length())));....
Looking for array, sorting, hava, decent, java, method
|
See Also,
*SIMILAR VIDEOS*
Searching Video's for array, sorting, hava, decent, java, method
|
advertisement
|
|