Click here to Skip to main content
15,888,610 members
Home / Discussions / Java
   

Java

 
AnswerRe: Java - Calculation in NEW array Pin
Richard MacCutchan11-Aug-15 6:15
mveRichard MacCutchan11-Aug-15 6:15 
QuestionDelimiters Pin
Member 107286679-Aug-15 10:58
Member 107286679-Aug-15 10:58 
AnswerRe: Delimiters Pin
Richard MacCutchan10-Aug-15 0:56
mveRichard MacCutchan10-Aug-15 0:56 
QuestionJava Bubble Sort Pin
Frankie12457-Aug-15 5:00
Frankie12457-Aug-15 5:00 
QuestionRe: Java Bubble Sort Pin
Richard MacCutchan7-Aug-15 6:21
mveRichard MacCutchan7-Aug-15 6:21 
AnswerRe: Java Bubble Sort Pin
Frankie12457-Aug-15 6:37
Frankie12457-Aug-15 6:37 
GeneralRe: Java Bubble Sort Pin
Richard MacCutchan7-Aug-15 21:09
mveRichard MacCutchan7-Aug-15 21:09 
GeneralRe: Java Bubble Sort Pin
Frankie12459-Aug-15 9:33
Frankie12459-Aug-15 9:33 
Thnks for the help,

I'm still having issue with the output if anyone could continue to help with this problem. I want the program to generate 10 random integers and then sort them in descending order.
C#
import java.util.Scanner;

class BubbbleHW {
  public static void main(String []args) {
    int i, j, temp;
    int array[] = new int[9];

    for (i = 0; i < array.length; i++)
      array[i] = (int) Math.random()*9;

    for (i = 0; i < ( array.length - 1 ); i++) {
      for (j = 0; j < array.length - i - 1; j++) {
        if (array[j] < array[j+1])
        {
          temp = array[j];
          array[j] = array[j+1];
          array[j+1] = temp;
        }
    }
    System.out.println(array);
}
    }

}

GeneralRe: Java Bubble Sort Pin
Richard MacCutchan10-Aug-15 0:54
mveRichard MacCutchan10-Aug-15 0:54 
GeneralRe: Java Bubble Sort Pin
Frankie124510-Aug-15 3:22
Frankie124510-Aug-15 3:22 
GeneralRe: Java Bubble Sort Pin
Richard MacCutchan10-Aug-15 3:34
mveRichard MacCutchan10-Aug-15 3:34 
Questioncennect unicenta with a phone problem Pin
Member 116403425-Aug-15 4:56
Member 116403425-Aug-15 4:56 
AnswerRe: cennect unicenta with a phone Pin
Richard MacCutchan5-Aug-15 5:23
mveRichard MacCutchan5-Aug-15 5:23 
QuestionJava Application Help - Inner Class? Pin
Member 1072866731-Jul-15 21:43
Member 1072866731-Jul-15 21:43 
AnswerRe: Java Application Help - Inner Class? Pin
Afzaal Ahmad Zeeshan2-Aug-15 1:55
professionalAfzaal Ahmad Zeeshan2-Aug-15 1:55 
QuestionJAVA SERVLETS and PHP Pin
anaQata31-Jul-15 5:10
professionalanaQata31-Jul-15 5:10 
AnswerRe: JAVA SERVLETS and PHP Pin
Richard MacCutchan1-Aug-15 22:10
mveRichard MacCutchan1-Aug-15 22:10 
GeneralRe: JAVA SERVLETS and PHP Pin
anaQata1-Aug-15 23:21
professionalanaQata1-Aug-15 23:21 
GeneralRe: JAVA SERVLETS and PHP Pin
Richard MacCutchan2-Aug-15 1:12
mveRichard MacCutchan2-Aug-15 1:12 
AnswerRe: JAVA SERVLETS and PHP Pin
Member 119648056-Sep-15 22:58
Member 119648056-Sep-15 22:58 
QuestionJava Pin
jubayer30-Jul-15 0:29
jubayer30-Jul-15 0:29 
AnswerRe: Java Pin
Pete O'Hanlon30-Jul-15 0:45
mvePete O'Hanlon30-Jul-15 0:45 
QuestionJava Set Game Pin
Member 1186286325-Jul-15 6:58
Member 1186286325-Jul-15 6:58 
AnswerRe: Java Set Game Pin
Richard MacCutchan25-Jul-15 8:17
mveRichard MacCutchan25-Jul-15 8:17 
QuestionJava Applet Help Pin
Member 1072866723-Jul-15 0:38
Member 1072866723-Jul-15 0:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.