Search:

Type: Posts; User: vanDarg

Search: Search took 0.09 seconds.

  1. Replies
    10
    Views
    1,771

    Re: Need a little help with the basics

    A quick example to show what I was getting at, the code I added is between the commented lines

    import javax.swing.JOptionPane;
    public class SelectionSort {
    public static void...
  2. Replies
    10
    Views
    1,771

    Re: Need a little help with the basics

    No worries! You DO want to use the String variable with JOptionPane.

    I was just playing around with it in eclipse, see if this bit helps:


    String result = "This is my text, stored in a String...
  3. Replies
    10
    Views
    1,771

    Re: Need a little help with the basics

    Not sure exactly what needs further explanation, but for instance, you are creating the String variable, but are not sending it to the method to display it. Also, remember to add a space in your...
  4. Replies
    10
    Views
    1,771

    Re: Need a little help with the basics

    The second parameter of the method showMessageDialog() takes a String. Therefore, you can send it a String, or a String variable:


    JOptionPane.showMessageDialog(null, "");
    // or...
  5. Replies
    10
    Views
    1,771

    Re: Need a little help with the basics

    He most likely meant to use a loop to set up the string:



    String result = "The numbers you......";
    for (int i = 0; i < list.length; i++) {
    result += numbers.....
    }
Results 1 to 5 of 5