Java and java Official Website
Java
Int [] array1 = {2,188,200,}; // defines an array with the messy size int index = 0; // defines the position of a maximum or minimum value int keyValue = 0; // defines the maximum or minimum value int temp = 0; // defines a temporary storage variable for (int I = 0; I <array1.length; I ++) {// cyclically all data indexes = I; // assign the I position to index keyValue = array1 [index]; // assign the value of position I to keyValue for (int y = I; y <array1.length; y ++) {// loop all the variables again, however, this time the starting length of the length is I, and the maximum length remains unchanged if (array1 [y] <keyValue) {// if the cyclic value is smaller than the I position value index = y; // The location is redefined as the current location keyValue = array1 [y]; // the minimum value is the current location} temp = array1 [I]; // assign the I position value to the temporary variable (maximum) array1 [I] = array1 [index]; // redefine the I position as index (minimum) location's array1 [index] = temp; // redefine the maximum value to the index location to implement the SWAp process} for (int p = 0; p <array1.length; p ++) {System. out. print (array1 [p] + "");}
<? Php/* select sorting: sort the array from small to large */$ array = array (2,100, 3, 50, 48, 99,502, 30, 27, 15, 16,300, 11, 9, 5, 4, 42); for ($ I = 0; $ I <count ($ array); $ I ++) {$ index = $ I; // set the index to the current cycle step $ keyValue = $ array [$ index]; // set the minimum value to the current for ($ y = $ I; $ y <count ($ array); $ y ++) {if ($ array [$ y] <$ keyValue) {// if the remaining data is recycled, A value smaller than I $ index = $ y; // The index location that records the minimum value $ keyValue = $ array [$ index]; // set the minimum value to the value at the minimum index position} $ temp = $ array [ $ I]; // assign the value of the current loop to the temporary variable (maximum) $ array [$ I] = $ array [$ index]; // assign the minimum value to the current position $ array [$ index] = $ temp; // fill the minimum value with the maximum value} print_r ($ array);?>
What is ++ = in java?
What is JAVA? Java is an object-oriented programming language that can write cross-platform application software. It is a Java programming language and Java platform (JavaSE, JavaEE, javaME. Java has excellent versatility, efficiency, platform portability and security. It is widely used in personal PCs, data centers, game consoles, scientific supercomputers, mobile phones and the Internet, it also has the largest developer community in the world.