title: JOptionPane display message
body: <p>I have question about JOptionPane.
  I was given an assignment to do the summation of odd number and even number.
  My profesor want us to diplay the "my name, the summation of odd and even number" in one JOptionPane box output. The dialog box are not allowed to prompt user to enter number.</p>
  
  <p>i only know how to display my name on the dialog box.
  here is what i write.</p>
  
  <pre><code>import javax.swing.JOptionPane;
  
  //class name
  public class Loops
  {
      //main method begin the execution of Java application
      public static void main ( String[] args )
      {
              //intialize the integer variable
          int sumOdd;
          int sumEven;
          int oddNumber;
          int evenNumber;
  
          sumOdd = 0;
          sumEven = 0;
          oddNumber = 1;
          evenNumber = 2;
  
          //create a conditional statement for integer odd number
          while ( oddNumber &lt;=25 )    
          {
        sumOdd += oddNumber;
        oddNumber +=2;
          }   
  
          System.out.printf ("The sum of odd number is %d\n", sumOdd);    
          //create a conditional statement for integer even number
  
          while ( evenNumber &lt;= 50 )
          {
        sumEven += evenNumber; 
        evenNumber +=2;
          }
  
          System.out.printf ("The sum of even number is %d", sumEven); 
  
          String message = "Written by BlaBla";
  
          JOptionPane.showMessageDialog(null, message);
      }
  }
  </code></pre>
  
  <p>before i wrote</p>
  
  <p>JOptionPane.showMessageDialog( null, "The sum of odd number is %d", The sum of even number i %d", oddNumber, evenNumber );</p>
  
  <p>and i also try another combination but it wont work</p>
  
  <p>any idea how to do it?</p>
  
  <p>Thank you so much in advanced for helping me out. </p>