Where is the mistake?

You told me to create comparable interface and CompareTo method in the main class which Student class to sort it by age.But the question that confuses me where should i put these codes to make it sort , i have tried for 5 hours but i got no benefit. I am going to provide you with the sort codes and tell me if there is any mistake in the following codes. the way of sorting is very easy but how to make them working.Inform me if there is any mistake.I know these codes but i don't know how to use them properly in the program that is why the program doesn't sort by age.Sorry for asking a lot but nobody going to help me. Thanks in advance
i put that code in the student class:public static Comparator<? super Student> Comprator() {
     // TODO Auto-generated method stub
     return null;in the Student Frame Class , i put the code for sorting List  <Student> students = new ArrayList<Student>();
               Collections.sort(students , Student.Comprator());
     lstStudent.setModel(new DefaultComboBoxModel(Student.students.toArray()));

warnerja wrote:
Tolls wrote:
You need to pass one of these:
Comparator
into the call to sort.
You will need to read up on interfaces if you don't understand what the information on that page means.He is passing a Comparator, but it's null. He seems to think: "As long as it compiles, there is no mistake". In that case, just turn in a simple "Hello, World" app every time you are asked to implement something. Hey, it compiles, it must be right!Yep. I probably should have said "You will need to read up on Java...", :)

Similar Messages

  • I can not adjust the automatic download for music, apps and books at the iPhone and the iPad. where is the mistake?

    I can not adjust the automatic download for music, apps and books.
    This is a problem by my iPhone and my IPad.
    Where is the mistake??

    Settings > Store > Change the settings you want.

  • By mistake I uninstalled my Acrobat someting, which gave me the opportunity to print .pdf and color-mark text. My licence key is [removed by moderator]. What is the name of the product? Where is the link for download and reinstall? Please help me r

    By mistake I uninstalled my Acrobat someting, which gave me the opportunity to print .pdf and color-mark text. My licence key is [removed by moderator - never disclose publicly]. What is the name of the product? Where is the link for download and reinstall? Please help me rapidly, Best regards / Stefan

    Sign in to your Adobe account online and look in the Plans/Products sections to see which program it might have been.

  • When I import files (copy from jpeg or copy as DNG from raw, where is the full size original stored?

    I have the photos go here file, does LR5 put the untouched original there? Do I need my own file for originals and if so, how does LR5 know where to find the full size original? I have everything working but don't understand where my untouched originals go after import. Say I import off my card to My Pictures/Lightroom Catalog/ Photos go here ..... are my originals there? What if I erase my card now, do I only have partial size negatives basically? I don't understand why LR5 didnt put in an originals do here file that imports the full photo to a stock folder. I am so confused I am about ready to throw out LR5. I even bought your instructional DVD and it doesnt make where the original files location clear, it just repeats that LT5 does NOT import the original, just thumbnail and instructions, where is the program getting the photo when I double click to open it , or am I only seeing a lower resolution version of the photo and the full res is now gone because I formatted the card?

    When you import photos, you can choose "Copy" or "Move" or "Copy as DNG", and then select a destination folder on your hard disk. This happens on the right hand side of the Import dialog box. So your original files go to this destination folder.
    Alternatively, if your photos are already on your hard disk, you can import by choosing "Add" and the original photos remain in the existing location.
    If you're not sure where the photos are, open Lightroom, go to the Library Module, and on the right hand side is the Metadata Panel. Set the dropdown to "Default", and it will show you where your photos are stored. Alternatively, you can right-click on any photo and select "Show In Finder"/"Show in Explorer" and Lightroom will take you to the exact folder where the photo is located.
    So, bottom line, you are in total control of where the originals go, and if your forgot where you put them, or made a mistake, you can always find out where they are.
    What if I erase my card now, do I only have partial size negatives basically?
    If your import was successful, then the photos are now stored on your hard disk. So you have the full size original for Lightroom to work with.
    it just repeats that LT5 does NOT import the original, just thumbnail and instructions
    Lightroom does import the original, which means, in Lightroom jargon, that it records the location and metadata about the photo; in other words, Lightroom knows where the photo is, but Lightroom NEVER contains your photo, your photo is ALWAYS stored on the hard disk.
    Because Lightroom now knows where your photo is located, it is important that you not manage your photos (move, edit, rename, delete) outside of Lightroom. Photo managements tasks now must be done in Lightroom. (There are advanced methods that let you manage your photos outside of Lightroom, but these would be NOT RECOMMENDED for beginners)

  • Safari will no longer open.  I was using firefox until I could find a fix for safari.  I made the mistake of changing my default search to firebox later for convenience and now I can't open my system preference or many safari or apple linked files.

    Safari will no longer open. It just goes back to my desktop.  When I right click on the safari icon in my dashboard it says it is open.  I was using firefox until I could find a fix for safari.  I made the mistake of changing my default search to firebox later for convenience and now I can't open my system preference or many safari or apple linked files. Some of my emails from trusted sites won't open and does the same thing. 
    I upgraded my original system from 10.4.11 to I believe 10.6. something about a year or so ago.  I thought about re installing my safari app but when I go to open anything connected to safari my screen goes back to the desktop.  I cant open any files that I have on my desktop that I set up through safari, like my banking program. Prior to changing system preference to safari default I was able to open those files and now I can't get into change it back.  Can you guide me through this?
    Thanks,
    Betty

    Try running the 10.6.8 combo update.
    10.6.8 Combo Updater
    System Preferences or Safari Preferences?
    Do a backup.
    Quit the application.
    Go to Finder and select your user/home folder. Select Library. Then go to Preferences/com.apple.Safari.plist. Move the .plist to your desktop.
    Restart the computer, open the application and test. If it works okay, delete the plist from the desktop.
    If the application is the same, return the .plist to where you got it from, overwriting the newer one.

  • Making a living with Dreamweaver; where's the beef?

    Circumstances have put me in a situation where I need to put my Internet design/development skills to work as a self-employed person. My previous experience has always been in the corporate cubicle environment. For those of you here who are successfully self employed, where are some good places to look for information about making the right decisions and avoiding the mistakes? I found some highly recommended books for sale at Amazon, but noticed they're written for bricks-and-mortar entrepreneur types, not nerds with a service to offer. Tips?

    Murray has offered some good suggestions. Here's a few more:
    Register a domain and start a website for your nascent company. Make it as good as you can make it. Get business cards printed and spend a bit of time either getting a logo (having a great designer design it) or by doing it yourself. Find yourself a very good hosting company that answers its tech support phone 24/7 and prepare to set up a VPS with that company. VPSs tend to run $400 - $500 annually, but you can put loads of websites on them and charge the going annual rate for an hosted website for each one, pocketing the profit.
    Join your local Chamber of Commerce. Go to Chamber meetups and, especially multi-chamber events. Hand out your business card and follow up. Learn to do a 30 second commercial about yourself and your company and tell people at these meetups exactly what you are looking for (eg: "This week, I'm looking for restaurants that need to put their entire menu on-line so that they can entice more to reserve").
    If you don't own a copy of Dreamweaver, get one. Also get a copy of Photoshop. Experiment with your own website. learn to do things faster. I literally live in these two applications and do websites for small businesses.
    I would try to learn either one server-side language (that is supported by your hosting company) or one client-side language (which ususally means Javascript) in the next year along with HTML and CSS. Be disciplined about learning new stuff.
    Keep good books. I realize that you will find that your earnings are depressing at first and you'll want to not even balance your checkbook. Don't give in to that temptation. Every purchase you make for your business is a tax-deduction. Every mile you drive to see a client is, too. Record everything and keep everything together. See a CPA this fall to set yourself up to save money come tax time in April. You might consider using either Quicken or Quickbooks Pro -- but you should get a categories list from a CPA that you will use next year so that he or she will be prepared for the kinds of things you are spending money on.
    Do not do a templated website and then do the same website for every client you come across. Make sure that what you do can be adapted to any kind of look you might want.
    Realize that Dreamweaver "plugins" will save you lots of time, but never directly charge a client for one. Any plugin you purchase needs to work for several clients and one client ought not have to pay for the entire purchase, which is supposed to make you faster.
    Realize that any technique done in any plugin also lives out there on the Internet. this includes drop-down menus, jQuery effects, image rotators, accordions and so on. The advantage of a plugin is to save you time so, if you are pressed for time, buy what fits your client's needs and try to make it pay you back with the next several clients.
    Keep track of your hours spent on each client so that you know how long it takes to do a website. Then make sure you're making more than minimum wage when you quote one.
    Do not do any website without a contract. Consult with a good attorney and set up your company and design a standard contract that you will have everyone sign before you start work. Always require a deposit for your work. Always insist on payment in full before you launch a website. I like my work, but I like my work for free not at all. My company is an LLC and that keeps anyone from going after anything I own, like my house, my car and so on. I have to pay an annual Business Entity Tax in my state, but it's an insurance policy that is more than worth it.
    Now, I am certain my suggestions have all ready bankrupted you in purchases and fees. But I have fewer headaches because I set things up before I really knew what I was doing.
    Now that I know a little more, I am very pleased to show it off a little.
    -Mark

  • Where is the home/application/address book in Lion.  Can't find it to move in a backup of my address book.

    Where is the home/application support/address book folder in Lion?  Can't find it to put in a backup.
    I made a mistake.  I want to find the home/library/application support/address book - not the application itself.  The whole library is not there - is it a hidden file?  And if so how do I get it to show?
    Bette
    Message was edited by: lopezbette

    Kappy wrote:
    All applications are in the /Applications/ folder, not the /Home/Applications/ folder. In fact the latter should not even exist unless you specifically created it.
    Kappy, I was going to start a Thread about the Application Folder so I'm glad you brought it up and you said that it should not even exist. I've had an Applications Folder within my Home Folder thru multiple OS. I'm even tempted to say since OS 9, but I'm not sure about that. There has never been anything in that folder and I don't remember ever creating it. Infact, The folder to me looks like a folder that would be installed as part of the OS.

  • Where is a mistake

    Hello people,
    I compilate the program and it is Ok,
    when i run it- i see nothing,
    who can help, where is a mistake?
    import java.awt.*;
    import javax.swing.*;
    public class myHex extends JFrame {
    RisuemHexagon rh;
    public myHex(){
    addWindowListener(new WindowDestroyer());
    Container cont=getContentPane();
    cont.setBackground(Color.blue);
    rh=new RisuemHexagon();
    cont.add(rh);
    rh.start();
    rh.run();
    public static void main(String[] args)
    myHex mh=new myHex();
    mh.setSize(500,500);
    mh.setVisible(true);
    import java.awt.*;
    import javax.swing.*;
    import java.lang.*;
    public class RisuemHexagon extends JPanel implements Runnable
    Thread thread;
    int position=0;
    int i;
    public RisuemHexagon()
    setOpaque(true);
    setBackground(Color.white);
    setPreferredSize(new Dimension(500,500));
    repaint();
    public void paint(Graphics g)
    super.paint(g);
    //for(int i=1;i<5;i++)
    g.drawLine(50,50,200-10*position,200);
    //Thread.sleep(300);
    public void start(){
    if(thread!=null) {
    return;
    thread=new Thread(this);
    thread.start();
    public void run() {
    try{
    while(thread !=null) {
    if(position>10) {
    position=0;
    repaint();
    synchronized(this) {
    wait(1000);
    position++;
    catch(Exception e) {}
          }

    Now with my code something wrong,
    the thread is working, but instead of drawing line step by step it is drawing all the line and repeat it may times,
    import java.awt.*;
    import javax.swing.*;
    public class myHex extends JFrame {
    RisuemHexagon rh;
    public myHex(){
    addWindowListener(new WindowDestroyer());
    Container cont=getContentPane();
    cont.setBackground(Color.blue);
    rh=new RisuemHexagon();
    cont.add(rh);
    rh.start();
    public static void main(String[] args)
    myHex mh=new myHex();
    mh.setSize(500,500);
    mh.setVisible(true);
    import java.awt.*;
    import javax.swing.*;
    import java.lang.*;
    public final class RisuemHexagon extends JPanel implements Runnable{
    int[] rx;
    int[] ry;
    Thread thread;
    int position;
    int i;
    public RisuemHexagon()
    setPreferredSize(new Dimension(500,500));
    setOpaque(true);
    setBackground(Color.white);
    position=0;
    rx=new int[3];
    ry=new int[3];
    rx[0]=50;
    ry[0]=50;
    rx[1]=100;
    rx[2]=100;
    ry[1]=300;
    ry[2]=300;
    public void paint(Graphics g)
    super.paint(g);
    try{
    g.drawPolyline(rx,ry,position);
    catch(Exception e){}
    public void start(){
    if(thread!=null) {
    stop();
    thread=new Thread(this);
    position=0;
    thread.start();
    public void stop() {
    thread=null;
    public void run() {
    try{
    while(thread !=null) {
    if(position>2) {
    position=0;
    repaint();
    synchronized(this) {
    wait(1000);
    position++;
    catch(Exception e) {}
          }

  • My iphone says I have 331 songs but only 139 can be played...where did the others go? How to get them back?

    The songs disappeared from two computers and are grayed in on my iphone...I cannot play 192 songs...how to get them back or how to delete them from my phone so I can start over?  I do not want icloud...I synced my phone to the computer and everything was fine for awhile...where did the songs go?

    Because it says it's incompatible when it can't be, I got hope. I get error messages all the time with my iPod and iPhone that it cannot sync and that 'this device is not capapble of connecting to iTunes' stuff. I literally forget that happened, plug it in again and it works, I later realize that iTunes made a mistake, they do that.

  • In 8.1.2 i have un checked the Ken BUrns effect in some individual slides. Sometimes it turns itself back on. At first I thought I'd made the mistake myself, but it has happend many times.

    in 8.1.2 i have un checked the Ken Burns effect in some individual slides. Sometimes it turns itself back on. At first I thought I'd made the mistake myself, but it has happend many times. Can I avoid this? Is the software flawed?

    Try trash the com.apple.iPhoto.plist file from the HD/Users/ Your Name / library / preferences folder. (Remember you'll need to reset your User options afterwards. These include minor settings like the window colour and so on. Note: If you've moved your library you'll need to point iPhoto at it again.)
    What's the plist file?
    For new users: Every application on your Mac has an accompanying plist file. It records certain User choices. For instance, in your favourite Word Processor it remembers your choice of Default Font, on your Web Browser is remembers things like your choice of Home Page. It even recalls what windows you had open last if your app allows you to pick up from where you left off last. The iPhoto plist file remembers things like the location of the Library, your choice of background colour, whether you are running a Referenced or Managed Library, what preferences you have for autosplitting events and so on. Trashing the plist file forces the app to generate a new one on the next launch, and this restores things to the Factory Defaults. Hence, if you've changed any of these things you'll need to reset them. If you haven't, then no bother. Trashing the plist file is Mac troubleshooting 101.

  • Where is the source or class path setting in 10.1.3.1.0.3

    Hello,
    Switched to 12 from 11i today.
    Very dumb question I guess but I am stuck at this - trying to compile a seeded controller or application module in my project. For example I have
    import oracle.apps.ar.cusstd.personalization.webui.CustStdPersonalizationImpl;
    in the seeded controller.
    The class oracle.apps.ar.cusstd.personalization.webui.CustStdPersonalizationImpl is right under my $JDEV_USER_HOME/myproject
    (I also have JDEV_USER_DIR pointing to the same place D:\oracle\jdevr12).
    I added
    D:\oracle\jdevR12\myprojects
    and
    D:\oracle\jdevR12\myprojects\oracle\apps\ar\cusstd\personalization\webui
    to Project Content but I am still getting
    Error(12,8): CustStdPersonalizationImpl not found
    Where is the place I should set my classpath?
    Can someone help?
    Thanks,
    Anatoliy

    small mistakes happen at times :)
    --Shiv                                                                                                                                                                                                                       

  • Where is the ham coming from

    I have recently made all the changes to ensure that spamassissin is working. This included creating two mail boxes one for spam and one for ham.
    I am now using spamtrainer and I have started placing mail I consider as spam into the spam mail box. I have not yet started placing non spam into the notspam mail box.
    I understand I need to feed the system SPAM and HAM. I assume I move messages that users receive that are spam into the spam mail box, and normal messages into the notspam mailbox. Is that right?
    I have started feeding it SPAM (only about 300 messages so far) but not HAM. When I run spamtrainer I get stats for SPAM and HAM. As guess, I would say the number of HAM and SPAM messages add up to the 300 or so. My question is where are the HAM messages (stats) coming from?

    Initial training gives the system a starting set of data, so it's more accurate from the beginning.
    Ongoing, think of it more as correction.
    When SpamAssassin makes a mistake, you should correct it.
    When Spam arrives properly marked as * Junk Mail *, you can just delete it. SpamAssassin has already learned from the message.
    If Spam arrives untagged, then you need to train/correct SpamAssassin so it learns the traits of that message as spam.
    And most important, if legit mail arrives tagged as * Junk Mail * you need to correct the system or it will continue to weight the characteristics (sender, servers used, words, etc) of that message towards spam.
    Feed the system as much HAM and SPAM as you can (1000s of each).
    Then ongoing, you should onlly have occasional corrections.
    Jeff

  • Where are the profiles stored for Profile Manager.

    Where are the profiles stored for Profile Manager?
    I created a profile attached to a user group and then made the mistake of removing the group without first deleting the profile.
    Now the orphan profile can't be managed (it's no longer visible) and is still being pushed out to users.
    The group I deleted had another group as it's members.
    Example:
    Active Sync User Group was a member of VPN Group.
    VPN Group was deleted (it had the VPN settings payload)
    Profile with VPN settings are still pushed out to Active Sync User Group even though VPN Group no longer exists.
    I'm hoping I can manually remove this profile but I'm thinking it may be contained in Postgres. If that's the case I would appreciate any suggestions/methods to access the database to make modifications.
    Thanks

    The information/data for apps is stored together with the app in both the iPad and in the backup on your computer. When you drop a file in the file sharing section of apps it gets added to the backup and to the iPad. When you delete it it get deleted from the backup and from the iPad.

  • My husband made the mistake of "upgrading" to IOS 7 last night.  Now he is receiving every text message that I send or receive.  How do I make this stop?

    My husband made the mistake of "upgrading" to IOS 7 last night.  Now he is receiving every text message that I send or receive.  How do I make this stop.  We have always shared the same Apple ID in the past and never had any problems.  I've seen posts where they say to create separate Apple ID's, but that means that whichever one of us does that, is gonna lose access to everything that is in our current ITunes account, correct? 

    My husband made the mistake of "upgrading" to IOS 7 last night.  Now he is receiving every text message that I send or receive.  How do I make this stop.  We have always shared the same Apple ID in the past and never had any problems.  I've seen posts where they say to create separate Apple ID's, but that means that whichever one of us does that, is gonna lose access to everything that is in our current ITunes account, correct? 

  • HP LaserJet Enterprise 500 551dn - where did the drivers go?

    I go to the download page to download the drivers for this 551dn.  I download all windows 7, 8, 8.1, 2008, 2012, so that i can put them on my print server.  I downloaded them from here..
    <http>//h20564.www2.hp.com/hpsc/swd/public/readIndex?sp4ts.oid=5081348&lang=en&lang=en&cc=lamerica_n...
    when i get the file, lets say for windows 7/64bit, i choose...
    HP LaserJet Enterprise 500 color M551 Printer Series PCL6 Print Driver (no Installer) 61.130.04.12834
    24 Sep 2014 21.3
    I get the file downloaded (LJEnt-color-M551-Drv-no-installer_12297.exe), i run it, get the security warning and Run.  the file extracts - then POOF, the installer is gone.
    where did the files go?  They aren't on the root of the C: drive, a folder/files were not created on my desktop, no files or folder created in my downloads folder.
    I was never asked for a file save location.... ???  really?   is this this basic stuff? 
    Where are the files?  this $$$ printer is a brick until i get drivers! 
    Thanks!
    Jason
    UPDATE- I FOUND THE FILES!!
    First of all, HP... i'm not impressed.
    All the files for all the drivers are in a series of temp folders...
    C:\Users\-myusername-\AppData\Local\Temp\3\7zS4A73
    really?
    hope this helps someone. 

    There is no change to this problem after 6 months since the last post. Put simply, and as stated in the previous posts, there is no way to scan a document and receive the image on your PC. If you are working with graphics for any length of time or want to create an image for inclusion as an image in a document or web page using this piece of equipment will not allow you to do so.
    Great shame as every other function works well - it cannot be beyond the wit of HP to include a Windows application that enables you to scan an image, receive it in the software you are using at the time (e.g. Outlook, Word, Photoshop...) and use it in your work.
    HP Printers several years older than this £1000+ Enterprise printer were able to do this simple job and have done so for a great many years. Just being able to use Microsoft's Fax and Scan would be start.

Maybe you are looking for

  • Date variable in watermark

    I'm generating .pdf as an output option from a DITA environment, and want to set up a .pdf watermark (Acrobat Pro X) to add the current date each time I update the content. I don't mind doing this as a separate step, until I've had time to grapple wi

  • I   Am  Not  Able  To  Use  Adobe  Reader 9  As  Installed  In  ITR  On  Line

    I   Am  Not  Able  To  Use  Adobe  Reader 9  As  Installed  In  ITR  On  Line

  • Java does not have pointer ..the reason

    Although java allows reference variable to objects... it does not allow pointers...... because Java byte code runs on the excution environment of host pc.. Applets are run on the embedded programs (webbrowser or else) in client pc. so if ....... if j

  • Installed win 7 on macbook pro, but want mac OS on it

    A friend got a macbook pro with win 7 not dual just single win os installed on it, we want to install a mac os on it so we got a mac os x tiger ver 10.4 and the mac does not recognize the installation disc, then we managed to get a copy of mac os x 1

  • Premiere Pro CS3 on Mac versus Final Cut Pro

    Any of you working on a mac with Premiere Pro CS3? If so, why did you choose Premiere over Final Cut Pro? I'm currently using a Matrox RTX100 on a custom made PC that has all the correct pieces of hardware to make it work. It's running PPro 1.5 and I