Not showing element

hi there - id appreciate if anyone can reply to me tonight as i have revision to do for this exam
im tryin to see whats in the element but it gives me memory address ref's..why?
//Main
     public static void main(String[] args)
          Object data1 = new Student("Fred", "Engineering", 123);
          Object data2 = new Student("Ahmed", "Engineering", 456);
          Object data3 = new Student("john", "Computing", 789);     
          ChainNode c1 = new ChainNode(data1, null);
          ChainNode c2 = new ChainNode(data1, c1);
          ChainNode c3 = new ChainNode(data1, c2);
          ConsoleIO.out.println(" " + c3);
     }     //this is ChainNode
import textio.*;
import java.util.*;
public class ChainNode
     private Object element;
     private ChainNode next;
     public ChainNode(Object element, ChainNode next)
          this.element = element;
          this.next = next;
     public String toString()
          return new String("Node = " + element);
}//this is student
import textio.*;
import java.util.*;
public class Student implements java.lang.Comparable
     public Student(String aName, String aCourse, int matric)
          theName = aName;
          theCourse = aCourse;
          theMatric = matric;
    public final boolean    equals(Object obj) {  
        return this.compareTo(obj) == 0;
    public final int    compareTo(Object obj) {   
        int parMatric = ((Student)obj).getMatricNumber();
        int result = 0;
        if(theMatric < parMatric)
             result = -1;
        else if(theMatric == parMatric)
             result = 0;
        else
              result = 1;
        return result;
    }    // method: compareTo
     public int getMatricNumber()
          return theMatric;
    public int    hashCode() {   
        Integer theMatNum = new Integer(theMatric);
        return theMatNum.hashCode();
    }    // method: hashCode     
     String theName;
     String theCourse;
     int theMatric;     
}it gives me: "Student@7b"
??

Try adding a toString() method in Student - currently you are only getting the method defined by Object

Similar Messages

  • JList not showing elements

    Hi To all,
    I am trying to get elements in a JList.All the things are going right but in the application it is not showing any data.
    my code is like ...
    JList jlist=new JList();
    while(---code---)
    //some code
    Vector datalist = new Vector();
    String fname=f.getName();
    for(int i=0;(i<datalist.size());i++)
    datalist.add(fname);
    jlist.setListData(datalist);
    System.out.println(datalist);
    it is showing all names in dos prompt through System.out.println()..
    but not through jlist.
    Any help please
    Thanks in advance

    I'm having a problem with JList (it's not showing the
    elements added to the List).
    i've checked the forum, but couldn't found the answer
    to my problem. Any suggestion on the forum search
    keyword?
    here's my code
    public class TestClass extends JFrame{
    public static void main(String args[]){
    JFrame fra = new MyClass();
    fra.show();
    public class MyClass{
    private JList list;
    public MyClass(){
    setSize(400,300);  
    list = new JList();
    JSplitPane split = new
    ew JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
    new JScrollPane(tree),
    new JScrollPane(fileList));
    ContentPane c = getContentPane(c);
    c.add(split);
    } // end of constructor
    public populateListAtRunTime(){
    DefaultListModel listModel = new
    ew DefaultListModel();
    listModel.addElement("Testing 1");
    listModel.addElement("Testing 2");
    list = new JList(listModel);/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    With this line you are not changing the
    list you have already added to the SplitPane
    (I think it is already added before this gets
    called, you never show the relationship of this
    method to the constructor...), instead, you are
    creating a new JList which you never add to
    anywhere. Is there a way to instead add elements
    to the JList's data model instead of creating a new
    one? Something like this:
    DefaultTableModel listModel = list.getListModel(); //Or something like it...
    listModel.addElement(//...);
    list.revalidate();
    } // end of myClass (inner class)
    The tree showed up in the split pane
    And i think the list also showed up on the splitpane
    also (except that the element value is not
    there)...any clue on why this is happening?
    sorry again..i know this topic must have been posted
    numerous time, but i'm bad with search term
    keyword..and did not find any result that come close
    to my match
    I tried JList + visible, JList + show, and a few
    other

  • Itunes not showing elements 11 drop down list of albums and won't sync, says ïtunes cannot sync, required folder cannot be found. ï have tried re installing both but no success. pls help!!!

    Hi, Itunes won't sync my photos to ipad from elements 11. itunes doesn't show drop down list of albums and says Ipad "......cannot be synced, required folder cannot be found" i have tried re installing both programs but no luck. pls help!!!

    I managed to finally fix the problem in a relatively painless way. It turned out that the problem wasn't on my phone, the problem was with iTunes. I completely uninstalled iTunes from my PC and then reinstalled it and everything was fine.
    In order to completely uninstall iTunes, I did two things:
    Used RevoUninstaller to uninstall iTunes. This cleans out a bunch of extra things that the normal iTunes uninstaller misses.
    Searched for any iTunes folders/files on my computer (using the freeware utility called Everything) and deleted them manually.
    I hope that works for you.

  • Why when using Adobe Bridge,  I apply a star rating,  the rating does not show up in Photoshop Elements? [tags]

    Why when using Adobe Bridge,  I apply a star rating,   the rating does not show up in Photoshop Elements.  I use Elements as my organizer and Bridge to view as it is much more user friendly.  Anyone any solutions??

    Most likely you have set the wrong file as the external editor. You don't want the obvious one; that's just a link to the welcome screen. Go back and choose this one, which is hidden away inside the folder Support Files:

  • Elements do not show up in edge file but they do in HTML file; no errors occured

    I am a senior in college working on building a website for a fictional company for a year-long thesis graphic design project. In my class last semester, I learned how to use Edge Animate and created an 11 page website without any trouble. I had always kept the files saved to my flash drive, and kept a backup on my personal laptop as well as on my external hard drive. There was also a backup of the files on a disc that I turned into my professor in mid-December. All of these files worked fine at the time.
    In early January, I wanted to make changes to the website so I installed a trial version of Edge Animate on my laptop. When I opened any of the edge files from any of the backups, the stage was blank and the animations did not show up on the timeline. The elements of the website still show up in the Library but they are no longer arranged on the stage. When I got back to school at the end of January, I tried opening the files on the school computers and had the same problem. I asked my professor to try the file that was saved to the disc and he encountered the same issues on his computer. All of these computers are either iMacs or Macbook Pros.
    I have not recieved any error messages and did not do anything to corrupt the files or save over them. I am able to open the html files in a browser with no issues; all animations and images work fine. The only change I can think of is that Edge may have been updated over break and when I installed the trial version I installed a newer version, and for some reason the new version of the program could not properly load my project that I started on a older version in October or November of 2013.
    I am happy to upload the files but I am unsure how to do that. Please let me know if there is a way to resolve this issue, or will I have to start over?
    Thank you!

    Try to clear your preference and restart your Animate.See if that fixes your problem
    http://helpx.adobe.com/edge-animate/kb/restore-preferences-edge-animate.html
    If  that does not work see if there is a lloopback address lookup.
    Check out the correct answer in this post to fix that http://forums.adobe.com/message/6116991
    Let us know if this fixed your issue

  • Text element assigned to select options not showing

    Hi guys,
    We have a problem in shaowing the text assigned to the select-options...
    When we run the program the text element ssigned to the select options is not showing instead the element name is shown.
    The original language is german, and it wont show the english word we appended to as text element for select-options.
    example:
    AUART insteat od blocked order
    How can we show the text elemen when we run the program?
    Thanks!

    Hi Mark,
    Go to the program text elements and select the Selection Texts tab,
    There you fill find the select option for AUART and the corresponding text maintained.
    You need to maintain translations for this text entered.
    Chose Goto (in menu bar) -> Translation
    Then maintain translation in English.
    Regards,
    Aditya

  • Does anybody know why when I aTrying to edit my yahoo profile using Firefox certain elements do not show up such as update "Load Photo" on the avatar page.

    Trying to edit my yahoo profile using Firefox and certain elements do not show up such as update "Load Photo" on the avatar page.
    If I use Explorer it allows me to see all the links and can edit my profile but not in Firefox.
    I am not sure the URL will let you in as is a private link.

    '''Try the Firefox SafeMode''' to see how it works there. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    * You can open the Firefox 4.0+ SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    '''''If it is good in the Firefox SafeMode''''', your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes
    ''When you figure out what is causing that, please let us know. It might help other user's who have that problem.''

  • I have photoshop elements 9 and iphoto does not show it in my preferences edit window. How do I get it as an option in my preferences

    I have photoshop elements 9 and iphoto does not show it in my advaced preferences drop down, it used to be there, how do I get it back again?

    Hi, Yes you are correct in iPhoto Prefernces, Advanced tab editing I used to have iPhoto and "Use external editor.". It changed to iPhoto and iPhoto Library. I have einstaleed PSE 9 and downloaded the update.  There is still no lkink to external editor in the drop down box.  Have I done something wrong inadvertently or is there a clitch?  can you reinstal iPhoto.  I am new to Macs. Every thing came preinstalled.  it is the top of the range system with 16 Gb of rRAM, 2 Tb hard drive to top graphics card etc.  I used to be on Windows PC.  Have more than 27,000 photos on the system.  Much apprecite your reply and interest in this.

  • Photo does not show up in Adobe Elements

    I have a MacBook and have iphoto set up to open the edit with Adobe Photoshop Elements and not with iphot oediting tool. I had version 8 of APE and upgraded to APE 9 - now the photo does not show up in the Adobe window when I try to edit. How do I fix this ?

    Most likely you have set the wrong file as the external editor. You don't want the obvious one; that's just a link to the welcome screen. Go back and choose this one, which is hidden away inside the folder Support Files:

  • Adobe Photoshop elements 10 Editor not showing under application support;adobe

    Adobe Photoshop elements 10 Editor not showing under application support;adobe on a MAC.  I would like to add actions in photo effects but can't add like instructios say because it is not in adobe.

    SSharpPhotography I would recommend posting your inquiry to the Photoshop Elements forum.

  • Why does adobe photoshop elements 6.0 not show up for a download choice of putting my photos into my computer, I'm on windows7.  I'm sure it did when I first got my computer.  Could it be that I have lots of other photo software that may be interfering?

    why does adobe photoshop elements 6.0 not show up for a download choice of putting my photos into my computer, I'm on windows7.  I'm sure it did when I first got my computer.  Could it be that I have lots of other photo software that may be interfering?@@

    If you open the Organizer and go to Edit>Preferences>Camera or Card Reader, do you have Auto Launch Adobe Photo Downloader on Device Connect checked?
    Try checking that if you don't.

  • Adobe Photoshop Elements 12 for Mac does not show up in Applications. Tutorial for editing from iPhoto shows selecting the Adobe software in Applications. Am I missing a step in registering product?

    Adobe Photoshop Elements 12 for Mac does not show up in Applications. Tutorial for editing from iPhoto shows selecting the Adobe software in Applications. Am I missing a step in registering product?

    I answered my own question: There's a difference between "download' and "install." Hunt for "install" (1.5 hrs in my case) and line up your passwords, Adobe ID, etc, then install. Took 15 min. The right choice shows up in Applications. Now it's on to figuring out why photo selected for edit in iPhoto does not show up on screen in Elements.

  • Camera new d810 not showing pix up in raw files in elements 11

    camera new d810 not showing pix up in raw files in elements 11 and lightroom 4

    DNGC 8.7 can be found, here:  http://www.adobe.com/downloads/updates/
    You can purchase upgrades to LR and/or PSE, here:
    http://www.adobe.com/products/catalog/software._sl_id-contentfilter_sl_catalog_sl_software _sl_mostpopular.html

  • Help- Elements 9 "Does not show Advanced dialog" for downloading

    Hi, I'm fairly new to elements and have gone through my "Dummies Book" and yesterday received my Elements 9 book by Scott Kelby and Matt Kloskowski.  My problem is when I'm attempting to download 5 new pictures from a card that still has 700 on it - The download organizer does NOT show the "Advanced Dialog button" on the bottom-left corner of the dialog box which as Kelby and Kloskowski indicate, would allow me to select only the 5 new pictures that I am attempting to download.
    Can anyone assist?  Do you have any recommendations?  It is clearly described (even with pictures) in the Scott Kelby book; however, my screen does not list the advanced dialog button.
    Thank you-Thank you-Thank you!

    Bob, It just seems that using windows to import into a file and then
    importing from Files and Folders is a workaround to not being able to bring
    up the Advanced Dialog Button.  I do appreciate and thank you for this
    suggestion!
    Overall, I'm disappointed in the Photoshop Elements 9 program.  It appears
    from reading this forum, that there are many similar difficulties with the
    Advanced Dialog Button and other similar programming elements that have
    perpetuated from Elements 8.
    Again, thank you for your time and interest and support in this forum.
    Without contributors like yourself, many "newbies" would be forever lost.
    One last question, Since I've downloaded by original batch of 700 photos
    three times now, what would be the easiest way of cleaning up my mess??????
    Thank you.   Hoping to be able to use this program by Christmas!!!!!

  • Elements 5 - Organizer will not show thumbnails

    Recently moved Elements 5 to my new laptop - On the laptop the organizer will not show photos in any view other than single picture.  Anything smaller shows the hour glass [also shows on the collections icons].  I deleated the first catalog transfer and have been only using new photos transfered from my D-50.  It will run full screen shows just nothing smaller that a single picture view.  I also uninstalled and reinstalled the Elements software.
    I have unchecked the filer checker.
    Systems is a Vista home premium 64 bit, 4 gig of ram, Lenovo ideapad laptop 5800T processor.  Version 5.0.2
    Any ideas?
    Alan

    I can't be sure this is the problem, but ...
    Is this the first time you have opened PSE5 on this computer? If so, it truly is generating the thumbnails. Your statement about how in single image mode the thumbnail appears is a symptom of this phase of the operation. Just let it run. It will finish, and the problem will be gone.

Maybe you are looking for

  • Internet Connection Sporadically Drops Out

    This problem has been ongoing for several months now.  Usually one or more times a day the internet connection will drop out, usually for a few minutes at a time.  Sometimes I get the yellow triangle in the taskbar, other times I don't.  I've gone ba

  • Finder window does not open

    This has start happening this week. I am using OS 10.7.5 on a Mac Pro desktop. When I click on the Finder icon in the tray nothing happens. I might have one or more finder windows open but none of them come forward when I click on the icon. I have to

  • My behavior is locked and I can't unlock.

    HELP!! I inherited this png. There is a Behavior Event: "onMouseover" Action "Set Text of Staus Bar" Info "Team" I wan't to delete this behavior but it has a lock on it and I can't seem to unlock it. Any ideas?

  • Variable in PLD

    Hi Dear; in journal voucher print out, how can i know the variable no of the system debit and system credit? best regards;

  • Unlocked iPhone - iTunes Sync?

    Hi all, I am about to buy an unlocked iPhone in Hong Kong. The only problem is, when I return to the UK and put in my old PAYG (vodafone and O2) sim, would iTunes be able to recognise and configure it properly? Would changing the sim cards affect my