Results 1 to 3 of 3

Thread: pls help

  1. #1
    kanmi is offline Member
    Join Date
    Nov 2010
    Posts
    7
    Rep Power
    0

    Default pls help

    this code is working in commmand dos but how can i display the result in GUI

    import java.util.Scanner;
    public class arbitrary
    {
    public static void main (String [] args)
    { double count=0;
    for (count = -1; count<=2;count=count+0.1)
    { System.out.println(count);}}}

  2. #2
    Iron Lion is offline Senior Member
    Join Date
    Nov 2010
    Posts
    210
    Rep Power
    4

    Default

    You'll need to read up on AWT and/or Swing.

    The statement count=count+0.1 could be more concisely written as count += 0.1.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •