The Artima Developer Community
Sponsored Link

Java Buzz Forum
Thursday Java Quiz: This One Should Be Easy...

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Weiqi Gao

Posts: 1808
Nickname: weiqigao
Registered: Jun, 2003

Weiqi Gao is a Java programmer.
Thursday Java Quiz: This One Should Be Easy... Posted: Jul 3, 2008 7:25 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Weiqi Gao.
Original Post: Thursday Java Quiz: This One Should Be Easy...
Feed Title: Weiqi Gao's Weblog
Feed URL: http://www.weiqigao.com/blog/rss.xml
Feed Description: Sharing My Experience...
Latest Java Buzz Posts
Latest Java Buzz Posts by Weiqi Gao
Latest Posts From Weiqi Gao's Weblog

Advertisement

... but it's not!

Since tomorrow is a holiday here, you get this week's Java Friday Quiz one day early.

Q: Will the following Java program compile, run without exceptions, or not?

import java.util.*;

public class Foo {
  public static void main(String[] args) {
    List list = Arrays.asList(3, 2, 1, 0);
    System.out.println(list.remove(3));
    System.out.println(list.remove(2));
    System.out.println(list.remove(1));
    System.out.println(list.remove(0));
  }
}

The strict rules apply this time: no books, no web, no running the compiler?

P.S.: BWT, my internet connection is acting up recently. Yesterday, I came home to find that my connection has been out for an hour and a half. I have to power cycle the DSL modem to bring the connection back up. I'll be out of town starting from tomorrow, which means this blog may be down until I come back next week.

P.P.S.: This month will mark the fifth anniversary (1810 days) of Weiqi Gao's Observations. I'm glad that I had the opportunity to express myself in ways I would never do in person. I'm grateful for the people who followed this blog through the years. I'm particularly delighted when people took the time to comment on this blog, either to correct my mistakes or to provide an alternative point of view on various topics.

Have a happy Fourth of July.

Read: Thursday Java Quiz: This One Should Be Easy...

Topic: links for 2008-06-26 from PeopleOverProcess.com Previous Topic   Next Topic Topic: LG Electronics has posted the first public review draft specification of JSR-300 DRM API for...

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use