algorithm - Java NullPointerException -


I'm writing two sections to handle simple auctions. I have a classroom ready and working, Who manages operations for an auction, and to keep track of available auctions now, I am writing another class like an auction house. While testing the following section of the class:

  import java.util.ArrayList; Public Class Auction House {Private Arrival & Lieutenant; Dutch Overview & gt; Huutokaupat; Public auction house () {} Public Zero AddOption (DutchAlternative Newaction) {Huitakapet.ed (new action); }}  

The main code ("Kopup" is a test and functional object-variable) with the following code:

  Auction = lock = new auction ); Talo.addAuction (kauppa);  

I get:

"Exception" in thread "main" at java.lang.NullPointerException ope.auction.dutch.AuctionHouse.addAuction (AuctionHouse. Java: 13) ope.auction.dutch.DutchAuctionTest.main (DutchAuctionTest.java:54)

How can I fix the problem?

< P>

You have never created an ArrayList

  Private ArrayList map = new Arrayist ();  

Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -