4 Replies - 8595 Views - Last Post: 16 August 2010 - 08:20 PM Rate Topic: -----

#1 dhkrullah   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 16-December 09

How do i create package in netbeans 6.8

Posted 16 August 2010 - 07:24 AM

Hello everyone,

Please i want to create the code below in a package how do i go about it?

package DataStructures; //am receiving an error here, netbeans draws a red line below the DataStructures;

class ListNode
{
    Object data;
    ListNode nxtNode;

    ListNode(Object object)
    {
        this(object, null);
    }

    ListNode(Object object, ListNode node)
    {
        data = object;
        nxtNode = node;
    }

    Object getObject()
    {
        return data;
    }

    ListNode getNext()
    {
        return nxtNode;
    }
}



This post has been edited by dhkrullah: 16 August 2010 - 07:36 AM
Reason for edit:: Fixed code tags.


Is This A Good Question/Topic? 0
  • +

Replies To: How do i create package in netbeans 6.8

#2 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12315
  • View blog
  • Posts: 45,414
  • Joined: 27-December 08

Re: How do i create package in netbeans 6.8

Posted 16 August 2010 - 07:25 AM

There is a user interface to do such. On the Files menu tree, you should be able to right click and create a new package in a directory.

Edit: Also, if you click on the error marker on the side with the line numbering, it should provide options and possibly correct for you.
Was This Post Helpful? 0
  • +
  • -

#3 dhkrullah   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 16-December 09

Re: How do i create package in netbeans 6.8

Posted 16 August 2010 - 07:41 AM

Thanks macosxnerd101, when i moved my mouse over the error, it says incorrect Package.

Thanks macosxnerd101, when i moved my mouse over the error, it says incorrect Package.
Was This Post Helpful? 0
  • +
  • -

#4 dhkrullah   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 16-December 09

Re: How do i create package in netbeans 6.8

Posted 16 August 2010 - 07:50 AM

Thanks so much macosxnerd101, i found the tool you talked about. I can now create a package.
Was This Post Helpful? 0
  • +
  • -

#5 pbl   User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8378
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: How do i create package in netbeans 6.8

Posted 16 August 2010 - 08:20 PM

Be awarded that, by convention, package name should be all lower case.
Some IDE will remembered it to you more or less politly.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1