A New Learner Stuck in one problem

Hi,
I ahve just started leaning JAVA. I have written one code but getting some error. Can any body help me out in debugging and explaing the cause of the error:
Thanks in advance,
Rhushi.
The error is pasted after the code.
Code:
class SetEmployee {
     int empno;
     SetDate dob;
     String name;
     static int count;
     static {        
          count=0;
     public SetEmployee()
          ; //this(name,dob=new SetDate(),empno);
     public SetEmployee(String n, SetDate d,int en)
          empno=en;
          dob=d;
          name=n;
          count++;
     public String toString(){
          return ("\nSerial No : "+ count +"\n Name of the Employee : "+ name +"\n His Employee Number is : "+ empno +"\n And his date of Birth is : "+ dob);
public class Employee {
     public static void main(String[] args){
          SetEmployee e1=new SetEmployee("Rhushi",(new SetDate(28,11,1980)),746);
          System.out.println("The information of the Employee is "+ e1 +"\n");
Error:
//The following error comes if we uncomment the line 12 otherwise the prog run as expected.
/*Employee.java:12: cannot reference name before supertype constructor has been called
this(name,dob=new SetDate(),empno);
^
Employee.java:12: cannot reference dob before supertype constructor has been called
this(name,dob=new SetDate(),empno);
^
Employee.java:12: cannot reference empno before supertype constructor has been called
this(name,dob=new SetDate(),empno);*/
^

/*Employee.java:12: cannot reference name before supertype constructor has been called
this(name,dob=new SetDate(),empno);
Employee.java:12: cannot reference dob before supertype constructor has been called
this(name,dob=new SetDate(),empno);
Employee.java:12: cannot reference empno before supertype constructor has been called
this(name,dob=new SetDate(),empno);*/Every class inherits (implicitly) from the Object class. Every class is constructed like an onion,
from the inside out, layer after layer. First the super class object is constructed (the inner layer)
and finally the current object is constructed.
A constructor can have two types of first statements --
1) and explicit call to this( ... ), i.e. another constructor or
2) a call to super( ...), i.e. a call to a super constructor.
If you don't explicitly supply 1) or 2), the compiler supplies a call super(); as the first statement
of the constructor.
You supplied a call to this( ... ) in your constructor. The compiler 'knows' then that a call to
any super constructor hasn't been called at that point, but you supply those member fields of
the current class as parameters to the other constructor. The inner layer hasn't been constructed
yet, so the outer layer (where those member fields reside) doesn't even exist yet; hence the
compiler diagnostics.
If member fields are not implicitly initialized, they take a value '\0', 0, 0.0 or null, whichever value
is appropriate for the type of the field. you could change your offending ctor to -- this(null, new SetDate(), 0); This has the same effect, by you're not referencing the (not yet existing) member variables anymore.
kind regards,
Jos

Similar Messages

  • My iPad air won't charge at all and I don't know if it's the charger or port help!i have had a new port put in before and it worked fine after but it's not working now! I have spent way to much trying to fix this thing one problem after another?

    My iPad air won't change at all, and I don't know if it's the port or charger cable it is charging normally but it just won't charge. I have had a new port put in before after a charger getting stuck in there but it worked fine after and now it's not working at all! I don't know if maybe it's the charger getting old but I have spent far too much money on this iPad then I should have as it's one problem after another witch is causing me lots of stress.

    Try giving your iPad a reset. Hold down the sleep and home keys for about 20 seconds. When you see the silver apple, let go and let it reboot and try again.
    How are you charging it? its's best charged plugged into the wall  not via USB. So if you're trying via USB, try using the supplied power block plugged into the wall.

  • Reader is stuck on one file and wont load a new file why?

    reader is stuck on one file wont load a new file why?

    Hey george,
    Could you please let me know if you are using the latest version of Adobe Reader i.e. 11.0.10
    What OS version are you using?
    Have you opened the file on the web or within Reader itself?
    You might close the file, launch Reader and go to Edit> Preferences> Security(Enhanced) and uncheck 'Enable Protected Mode at startup' option.
    Let me know if this sorts your problem.
    Regards,
    Anubha

  • Thank you all for the responses. By process of elimination, I think the problem is the connection to the express in between the extreme and dock. I bought another express and tried it at dock, no luck, I then replaced new express where the one is between

    I have an airport extreme and express setup. My extreme is in my 2nd floor office with windows facing the water. My dock is about 250 ft away down a very steep hill. I have the express about 100 ft down the hill in an electrical waterproof box attached to a tree as high as I could install. The signal is weak and I'm thinking I might have to buy another express. Any thoughts on the best setup for me. I ultimately want to control speakers(hard wired in) down at the dock with my iphone. I have a receiver coming with airplay built in.
    Thank you all for the responses. By process of elimination, I think the problem is the connection to the express in between the extreme and dock. I bought another express and tried it at dock, no luck, I then replaced new express where the one is between extreme and dock, no better. I unplugged the express between extreme and dock and there was no difference. So I believe I am connecting to the airport express or extreme that is inside the house. Again because when i approach express that is halfway I reconnect. so if you can understand my chaos, I believe the express in between is not really connecting to the extreme inside my house. Yes, No? So I need to know how to know if the express half way down the hill is getting the connection from the the extreme in the house. This is wearing me out!!!!!

    You are asking several different questions. If you need to store your photos, music, and movies on an external volume, you certainly can. Any externally connected hard disk drive will work, connected either directly to your Mac or to your Time Capsule as a shared volume.
    You should not rely upon using that as a backup device though. Although you certainly may use it for both purposes, it is a better idea to have dedicated backup devices for a variety of reasons not limited to redundancy. You would not want to simultaneously lose all your pictures as well as your backup. If they are all on the same device, that could happen. Furthermore, a backup cannot back up the volume on which it is running.
    As for adding an Extreme or Express, using its LAN port for your iMac, and then enable Internet sharing so you can effectively use the iMac as a "hotspot", you can do that too, but I am unclear on what benefit you believe this arrangement would convey for you.
    An Extreme's Guest network is separate from its Main network; that is the reason for having it.

  • I want to reinstall CS4 as it has been doing some strange things regarding printing, etc. However, when I did this before, it created a major problem and I ended up buying a new computer because no one could figure out why it kept hanging up during the in

    I want to reinstall CS4 as it has been doing some strange things regarding printing, etc. However, when I did this before, it created a major problem and I ended up buying a new computer because no one could figure out why it kept hanging up during the installation. Hours on the phone, no results. I'm scared to do it on this computer. Should I try? Not even the Adobe support could get it resolved. I believe it was somehow reading a product number that could not be deleted or something, and nothing worked.
    Message was edited by: Doug Doug

    Hello, as an addition:
    In your case I would download a really new trial version of your program(s) in question and change it/them into a "real" version later, BUT because you said, that you "re-installed" already, so it will become a little bit more complicated. It would be necessary that you have to use "Adobe Creative Suite Cleaner Tool" as Keith wrote.
    Here an advice for that (The order varies depending on your individual needs. Please read all my proposals first, so you can better choose the first step:)
    1. Maybe you have to activate/deactivate, so please have a look there:
    http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html
    2. Sometimes, we know in the meantime, the "opm.db file" is the culprit. In this case you should delete it.
    3. Be careful with (de)installing aso. by (de)installing by your own resources. As much as I regret it and as strange as it may seem I fear it's a challenge for Adobe's Creative Cloud Cleaner Tool. Sometimes - for whatever reasons - CC doesn't "want" to work. In this case you should CC completely delete and reinstall by help of Adobe Creative Cloud Cleaner Tool. (A try to uninstall by own resources is not enough!)
    I quote: Adobe Creative Suite Cleaner Tool helps resolve installation problems for Adobe Creative Cloud and Adobe Creative Suite (CS3-CS6) applications. The tool removes installation records for prerelease installations of Creative Cloud or Creative Suite applications. It does not affect existing installations of previous versions of Creative Cloud or Creative Suite applications.
    Please use: http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html   and follow the prescribed sequence of operations
    4. If necessary and for further questions click through http://helpx.adobe.com/contact.html and if "open" please use the chat, I for may part - as it seems unlike you - had the best experiences. I quote from Adobe's employee Preran: The chat button is activated as soon as there is an agent available to help.
    Hans-Günter

  • I have one problem with my iphone 4s i c"ant  make facetime calls with other iphons. olso when i make calls on the facetime icon is question sign! can any oane hellp me! wath my be the problem because it is all new iphone!

    i have one problem with my iphone 4s i c"ant  make facetime calls with other iphons. olso when i make calls on the facetime icon is question sign! can any oane hellp me! wath my be the problem because it is all new iphone!

    First question where ae you located?  If you're in the Middle East or UAE, factime has been restricted by the government.
    If your not from there look here:
    http://support.apple.com/kb/TS3367

  • I am one of many who were frustrated at the loss of visible keywords in Lion.  Will the new Mountain Lion solve this problem?

    I an one of many who were frustrated at the loss of visible keywords in iPhoto in Lion.  Will the new Mountain Lion solve this problem?

    I'm not sure whether we are quite talking about the same thing? 
    With iPhoto in OSX 10.4.11 all the keywords were visible in the iPhoto library.  When I moved my photos to a computer with Lion I lost this feature, there was a lot of discussion at the time about this being a backward step by Apple.  So I wondered whether the Mountain Lion version of iPhoto has restored this feature?

  • When I have video clips on my timeline, they do not play in the monitor screen. I hear the sound track but can not see the image. To test if my new files are somehow the problem, I went back and used video files that I used successfully a year ago, and th

    When I have video clips on my timeline, they do not play in the monitor screen. I hear the sound track but can not see the image. To test if my new files are somehow the problem, I went back and used video files that I used successfully a year ago, and they no longer play in the monitor window. I hear the sound track, but do not see any video. Have I changed some setting that controls video playback in the monitor window?

    Randy Ruttger
    Thanks for the follow up.
    Missing in this equation were the version of Premiere Elements that you were using and the computer operating system on which it was running. But...
    The deed is done. But.....Until now and after you went ahead and moved to version 12, we now learn what version of Premiere Elements you were using. We still do not know the computer operating system involved.
    You just said Premiere Elements 10. Premiere Elements 10 is hit by a serious known display issue if the computer uses a NVIDIA GeForce video card/graphics card. In this issue, the only remedy is to roll back the driver version to about May 2013. The description of the problem and how to do the roll back are described in one of the Announcements at the top of this forum. What video card/graphics card does your computer use?
    On another front, Adobe will be releasing a new version of Premiere Elements any day now. No one but Adobe knows the feature set for the new version. That type of information is announced at the moment of release of the new version.
    So the remedy to the problem that you presented in this thread could have been...
    1. Rolling back the NVIDIA GeForce driver version to about May 2013 if possible (Windows 8 or 8.1 64 bit, may not be possible)
    2. Move to another version of Premiere Elements (which you did)
    I offer the above for consideration so that you can review your decisions. We are pleased to learn that Premiere Elements 12/12.1 works for you.
    Please do not hesitate to ask questions and ask for clarifications, but remember that the answers are in the details.
    Best wishes,
    ATR

  • Importing Still Images - Stuck on one step

    I've never imported a still image into FCP before but I'm following some Ken Stone articles on doing it but I'm stuck on one bit.
    I've pasted in the directions below and its the third one, "paste in photgraphs". I've never used Photoshop (im using elements) and I just can't paste in the photo i want to use. The 'copy' and 'paste' options are greyed out so i really don't know how to progress. Any help would be apreciated.
    1) From PhotoShop File menu > new.
    2) Set Width to 720 pixels, Height to 540 Pixels, Resolution to 72 dpi, Color Mode to RGB, and Contents to White or choose a Background Color.
    3) Create your artwork, set text, paste in photographs. When done with your art work Save this image and give it name like "Image Name 540".
    4) File menu > Image > Image size
    5) In the Image Size dialog box FIRST uncheck the 'Constrain Proportions' box.
    6) In the Pixel Dimension section, top the dialog box, change your Height setting from 540 to 480. Leave the Width setting at 720.
    7) Click Okay.
    If you look at your image you see that it is now distorted, flatten down. Don't panic, this is the conversion process and when the square pixels get converted to rectangular pixels in NTSC your image will once again look correct.
    8) Do a 'Save As', Photoshop format (.psd) and name the file "Image Name 480".
    9) Import into FCP and render. You will see that your image on NTSC once again has it's proper proportions.

    Not quite sure I follow you. You're having problems in Photoshop?
    You must open the photo as a separate file in photoshop. Just find the image you want to use, control/right click on it and choose open with>photoshop.
    When this image is open, you can click-hold-and-drag it across to your main image canvas.

  • Ipod shuffle stuck on one song

    my friends little girls ipod shuffle is stuck on one song. How do I fix it

    I have the exact same problem.  I have a brand new 4th generation iPod Shuffle.  I subscribed to six  podcasts in iTunes and then sync'd.  The Shuffle will only play the first podcast.  If I hit the "next" button, it doesn't do anything.  If I let the podcast play to the end, it just restarts.  If I resync, it will remove the podcast I've listened to and then only play the next podcast.
    As far as I know, there is no "repeat" function on the 4th generation Shuffle.  If there is, can you please provide the page number in the manual that explains how to shut it off?

  • My ipod is not recognized on a new computer after old one crashed.  I have painstakenly restored all songs and playlists.  I deautorized all, and the reauthorized new computer.  It won't sync.

    My ipod is now recognized on a new computer after old one crashed.  I installed itunes on the new computer, and have painstakenly restored all songs and playlists. I also purchased several new songs from the itunes stores.  Now my ipod will not sync with the new computer.  I deauthorized all computers, then reauthorozed the new one.  My ipod still won't sync.

    ...after running diagnostics through itunes, itunes says  "device not found"  Seems there are a lot of others having this problem,and it seems to be related to new version of itunes.  Apple should do something to fix this.

  • How to backup new learned remote-control data for the IR-remote APP???

    Hello @ all,
    does anybody know a way to backup the new learned remote control on XPERIA Z Tablet?
    I found a database under:
    "system/vendor/etc/sony-ir-remote/db"
    But after I've saved new learned remote controls the date and the size of these DB's
    are the same as before. Therefore the IR-remote control APP dosn't save the new data
    in these files.
    Furthermore there isn't a button in the remote-control APP to backup new learned remote controls.
    And I can't choose the remote control APP in the backup function APP from the XPERIA Z Tablet
    to save the data. Also the backup with the Sony PC Companion Software dosn't save the learned
    remote controls. Who develops such a dross mobile software?
    Sorry SONY, but you have the most unpalatable support I've lived to see!
    The first SONY support center refered me to another support center.
    The mobile support center does not answer to my questions per mail.
    Then I call the mobile support center. The answers were shallow and standard.
    The support engineer want to ask the development and call back.
    However, I am still waiting for promised recall.

    I am facing the same problem.
    I have spend a few days to configure and train my Sony tablet to configure for all my remotes such as aircon and lighting. I did a backup using the Sony companion to my PC. When my tablet was faulty and serviced. But the backup did not recover the IR remote settings and codes which I programmed previously. I also tried your backup restore app but it also does not save the configuration.
    It is VERY IMPORTANT for me to backup the settings.
    Please provide the folders and path of where the IR REMOTE settings and personal configuration and codes trained were kept so that I could back them up. Are these path protected area that required rooted access?
    Hope that Sony could update the app to include backup of new trained codes and settings and in the meantime to provide a procedure of how to backup the setting and trained IR codes with or without rooting the device.

  • Safari on my iPhone 4 is stuck on one page. How do i get it going again?

    Safari on my iPhone 4 has got stuck on one page. It wont respond when i try to enter a new address or google a question. I cant get it to show all the pages that are open and delete any. In short it wont do anything. What can i do?

    Hooray! Of course! I should have remembered that all you ever have to do is switch if off and switch it on again!
    Thanks a million

  • IE 10 blank new tab and missing favourites problem only when requiring a proxy for first page visit

    We are having a very strange situation with one (only) of our 64bit 2008r2 remote desktop session host servers.  The problem we are having is that when any new tab or window is opened it must first open a page that is in the
    internet options -> connections ->LAN settings -> Advanced -> Exception. Do not use proxy server for addresses beginning with
    Area.  OR ELSE....
    The entire contents of the favourites menu below "Organize favourites" is missing, though the favourites explorer bar, and tool bar display the links, but they cannot be opened in the current tab and will not create a new tab when you click open
    in new tab.  HOWEVER, this problem is instantly resolved if you manually type into the address bar and visit a site that is in the proxy exception list.  Then that tab starts to function normally, the favourites menu is populated and works, and so
    does the favourites explorer bar, and toolbar, and other websites can be visited.
    This is extremely problematic.  Looking at the proxy server logs, when the problem is happening no attempt is made at contacting the proxy server.
    Ways we've encountered this problem
    If the user has the option set that a new tab opens the 'new tab page' then any new tab experiences the problem.
    If the browser is set to open the user's home page(s) then any of the home pages that are not in the exception list may or may not open successfully. But again any of them that opened a page that was not in the proxy exception list will experience
    the problem
    when a user tries to click on a website link from an email or document that is not in the proxy exception list, as this opens a new window or tab and it is just blank.
    when a website not in the exception list tries to open a new window/tab
    This problem is happening for all users on that RD session host server, including domain admins, except for THE domain/enterprise administrator.  Our other 2008r2 64bit RD session host servers and windows 7 machines with the same version of IE
    installed on it does not have this problem.
    We have tried deleting all IE data, resetting IE, re-registering the ieproxy.dll with the regserv32 command and the problem continues.
    Our proxy settings for each user is coming from the group policy setting of 'computer config -> policies -> Administrative Templates -> Windows Components -> Internet Explorer -> Make proxy settings per-machine = enabled'
    and THE domain administrator choosing to enable the proxy server and disable automatic proxy detection.

    Hi,
    Since you have  tried many methods like deleting all IE data, resetting IE, and it works well on other Windows 7 machines, the problem might be some clients didn’t respond to the group policy.
    Try to update the group policy with this command at the clients ”gpupdate /force”.
    And check whether the client is infected with virus, some virus might cause this issue too.
    Regards
    v-yamliu

  • Imported photos, transferred some photos to new album, deleted originals, ones in album are gone. How do I retreive them?

    Imported photos, transferred some photos to new album, deleted originals, ones in album are gone. How do I retreive them?

    Check the iPhoto trash - if they are there select them and right click and restore to library
    If they are not there then they are gone
    You really should take the time to learn how to use iPhoto - photos exist only in one place  - in your events - albums, keepsakes, etc are just pointers to the actual photos in the event - deleting from an album does just that - deletes from the album - deleting from an event removes the photo and therefore all albums, keepsakes, etc
    watch the videos as a starter - iPhoto help menu ==> iPhoto help and watch the video
    also more details (for a previous version so some menu items are in different places but the concept is the same) - and it would be a worthwhile investment of time to take the iphoto tutorials - http://www.apple.com/findouthow/photos/ - they are very helpful and will save you a lot of time and frustration.
    LN

Maybe you are looking for

  • PHONE SERVICE FOR SPECIAL NEED CUSTOMER - YOU NEVER SHOWED????

    We have been able to maintain my brother-in-law in an independent setting for most of his 59 years of life. Beyond his diabetes, cognitive delays and heart disease, he also struggles with the residual effects of schizophrenia and an awareness that he

  • Moving from XI 3.0 to PI 7

    Hi, We are in the process of moving XI 3.0 systems from PI 7.0 servers on sql server 2005. There could be 2 scenarios for both the activities: 1) Installing the PI 7.0 system on netweaver 2004s on the new boxes and than replacing the data files and t

  • What does this error2 mean and how do I fix it?

    What does this error mean and how do I fix it?  I am trying to reinstall CS4 on my Windows 8.1 machine.  Adobe Flash Player 10 ActiveX Error: Error 2. Here is the initial error: http://s29.postimg.org/wqy2ju8iv/Untitled.png Here is a screenshot when

  • ITunes Video Compared to DVD on MBP?

    I want Scrubs season 5 on DVD. But season 4 comes out in October so who knows when season 5 will be out. It's available on iTunes but I am concerned about the quality. If I download the season, will it compare to DVD quality on my MBP? I found this w

  • Query Regarding the Oracle PL/SQL Developer OCA

    Hi All I am planning to go for the certification "Oracle PL/SQL Developer OCA " But I am not sure what is value of this certification in market. Please help me out. Thanks in advance Amit