Hey guys, I have never had this error pop-up before compiling. It says it cannot find my javaaplication class...
public static void main(String[] args) { double[] myList = { 5.0D, 4.4D, 1.9D, 2.9D, 3.4D, 2.9D, 3.5D }; System.out.println("My list before sort is: "); printList(myList); bubbleSort(myList); System.out.println("My list after sort is: "); printList(myList); } static void printList(double[] list) { for (int i = 0; i < list.length; i++) System.out.println(list[i]); } static void bubbleSort(double[] list) { boolean changed = true; do { changed = false; for (int j = 0; j < list.length - 1; j++) { if (list[j] <= list[(j + 1)]) continue; double temp = list[j]; list[j] = list[(j + 1)]; list[(j + 1)] = temp; changed = true; } } while ( changed); } }
Thanks for help
--- Update ---
package javaapplication18; /** * * @author Onlyname */ public class JavaApplication18 { /** * @param args the command line arguments */ public static double min(double[] array) { double[] myList = new double[10]; java.util.Scanner input = new java.util.Scanner(System.in); System.out.print("Enter " + myList.length + " values: "); for (int i = 0; i < myList.length; i++) myList[i] = input.nextDouble(); // TODO code application logic here double min = myList[0]; for int(int i = 1; i < myList.length; i++){ if (myList[i] > min) min = myList[i]; } return min; } }
Sorry first post was incorrect. This is the code with the problem.