91


// control
class I {
     public static void main(String[] args) {
          System.out.println(“hello, i…”);
     }
}
———————————
$ javac I.java
$ java I
hello, i…
$ exit

———————————
// no control
class Me {
     public static void main(String[] args) {
          System.out.println(“hello, i…”);
          for (int i = 1; ; ) {
               System.out.println(“… who am i?”);
          }
     }
}
———————————
$ javac Me.java
$ java Me
hello, i…
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
… who am i?
..<CTRL-C>
$ <RETURN>
$ <RETURN>
$ <RETURN>
$ java I
hello, i…
$ <RETURN>
$ <RETURN>
$ exit

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s